Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.apple2.programmer > #4206 > unrolled thread

A Peekin and a Pokin...

Started byAnthony Ortiz <anthonypaulo@gmail.com>
First post2018-02-10 16:48 -0800
Last post2018-02-15 00:22 -0600
Articles 12 — 8 participants

Back to article view | Back to comp.sys.apple2.programmer


Contents

  A Peekin and a Pokin... Anthony Ortiz <anthonypaulo@gmail.com> - 2018-02-10 16:48 -0800
    Re: A Peekin and a Pokin... Anthony Lawther <alawther@spammenot.mac.com> - 2018-02-11 13:44 +1000
    Re: A Peekin and a Pokin... Michael J. Mahon <mjmahon@aol.com> - 2018-02-10 21:52 -0600
      Re: A Peekin and a Pokin... Anthony Ortiz <anthonypaulo@gmail.com> - 2018-02-11 07:49 -0800
      Re: A Peekin and a Pokin... michael@apps.guidero.us - 2018-02-11 13:07 -0800
        Re: A Peekin and a Pokin... Anthony Ortiz <anthonypaulo@gmail.com> - 2018-02-11 13:29 -0800
        Re: A Peekin and a Pokin... Antoine Vignau <antoine.vignau@laposte.net> - 2018-02-11 13:50 -0800
          Re: A Peekin and a Pokin... MG <michael@apps.guidero.us> - 2018-02-11 14:58 -0800
    Re: A Peekin and a Pokin... gids.rs@sasktel.net - 2018-02-10 22:56 -0800
    Re: A Peekin and a Pokin... Brian Patrie <bpatrie@bellsouth.spamisicky.net> - 2018-02-12 21:07 -0600
      Re: A Peekin and a Pokin... Anthony Ortiz <anthonypaulo@gmail.com> - 2018-02-14 18:30 -0800
        Re: A Peekin and a Pokin... Brian Patrie <bpatrie@bellsouth.spamisicky.net> - 2018-02-15 00:22 -0600

#4206 — A Peekin and a Pokin...

FromAnthony Ortiz <anthonypaulo@gmail.com>
Date2018-02-10 16:48 -0800
SubjectA Peekin and a Pokin...
Message-ID<2a1f7d29-0d95-4062-add7-701c8b227cb1@googlegroups.com>
So I'm peekin' and a pokin' some soft switches to see what value their 'read' soft-switch would look like and I thought they would read 0 or 1 (or even whatever values I poked in) depending on whether the switch is on or off but what I'm seeing is $0D and $8D no matter what I poke in them. For example, I poke anything into 80store off ($C000) and the READ switch for it ($C018) reads $0D, and when I poke anything into 80store on ($C001) it reads $8D. Is this expected? I'm doing this on AppleWin so I don't know if this is expected or not.

Also, I tried a small basic program in sather's book (page 5-27) and it freezes AppleWin :

10 POKE -16383,0 : REM SET 80STORE
20 POKE -16299,0 : REM PAGE2 = AUX = EVEN
30 POKE 1024,193 : REM DISPLAY "A" AT TOP LEFT

Is this a bug or am I missing something?

[toc] | [next] | [standalone]


#4207

FromAnthony Lawther <alawther@spammenot.mac.com>
Date2018-02-11 13:44 +1000
Message-ID<1994941162.540012375.165757.alawther-spammenot.mac.com@nntp.aioe.org>
In reply to#4206
Anthony Ortiz <anthonypaulo@gmail.com> wrote:
> So I'm peekin' and a pokin' some soft switches to see what value their
> 'read' soft-switch would look like and I thought they would read 0 or 1
> (or even whatever values I poked in) depending on whether the switch is
> on or off but what I'm seeing is $0D and $8D no matter what I poke in
> them. For example, I poke anything into 80store off ($C000) and the READ
> switch for it ($C018) reads $0D, and when I poke anything into 80store on
> ($C001) it reads $8D. Is this expected? I'm doing this on AppleWin so I
> don't know if this is expected or not.
> 
> Also, I tried a small basic program in sather's book (page 5-27) and it freezes AppleWin :
> 
> 10 POKE -16383,0 : REM SET 80STORE
> 20 POKE -16299,0 : REM PAGE2 = AUX = EVEN
> 30 POKE 1024,193 : REM DISPLAY "A" AT TOP LEFT
> 
> Is this a bug or am I missing something?
> 

When you poke a soft switch control location the value you use is generally
ignored. This method uses only Address lines to select and operate the
switch, meaning the data lines aren't connected and the circuitry is much
simpler. 

When you read the soft switch status location generally only the high bit
is driven on the data bus. One method for checking this is to branch on the
status of the sign flag after reading (BMI or BPL). 

When the lower bits in a byte aren't driven then the state of the floating
bus will be captured in them. Depending on the time within the display
scan, the display mode active, and the contents of display memory, you may
see varying results in the lower 7 bits. 

If data bits are stored then the location is normally called a register. 

Regards,
Anthony 

[toc] | [prev] | [next] | [standalone]


#4208

FromMichael J. Mahon <mjmahon@aol.com>
Date2018-02-10 21:52 -0600
Message-ID<I7GdnbhFaY9oIOLHnZ2dnUU7-f3NnZ2d@giganews.com>
In reply to#4206
Anthony Ortiz <anthonypaulo@gmail.com> wrote:
> So I'm peekin' and a pokin' some soft switches to see what value their
> 'read' soft-switch would look like and I thought they would read 0 or 1
> (or even whatever values I poked in) depending on whether the switch is
> on or off but what I'm seeing is $0D and $8D no matter what I poke in
> them. For example, I poke anything into 80store off ($C000) and the READ
> switch for it ($C018) reads $0D, and when I poke anything into 80store on
> ($C001) it reads $8D. Is this expected? I'm doing this on AppleWin so I
> don't know if this is expected or not.
> 

It is expected. All bits read except the high bit are "vapor" bits left in
the capacitance of the floating bus, since the status reads only drive the
high bit. 

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

[toc] | [prev] | [next] | [standalone]


#4210

FromAnthony Ortiz <anthonypaulo@gmail.com>
Date2018-02-11 07:49 -0800
Message-ID<ebf2f896-f490-4a93-88eb-a84fa8d08d33@googlegroups.com>
In reply to#4208
Thx guys, that makes sense... so only check high bit for status.

[toc] | [prev] | [next] | [standalone]


#4211

Frommichael@apps.guidero.us
Date2018-02-11 13:07 -0800
Message-ID<2a339874-7e51-43bc-8531-dee4a24f369f@googlegroups.com>
In reply to#4208
On Saturday, February 10, 2018 at 7:52:26 PM UTC-8, mjm...@aol.com wrote:
> It is expected. All bits read except the high bit are "vapor" bits left in
> the capacitance of the floating bus, since the status reads only drive the
> high bit. 

On real hardware in the range $C000-$C01F, the low 7 bits generally reflect the last key pressed.  Hence why Anthony is getting $0D or $8D on $C018, because the last key one usually presses in order to see output is RETURN.

Many emulators get this wrong and either float the bus except on $C000 and $C010, have the other bits being 0, or some bizarre combination that doesn't reflect the real hardware.

MG

[toc] | [prev] | [next] | [standalone]


#4212

FromAnthony Ortiz <anthonypaulo@gmail.com>
Date2018-02-11 13:29 -0800
Message-ID<aeace5df-e7e4-4616-ac95-b853f2cb03b6@googlegroups.com>
In reply to#4211
On Sunday, February 11, 2018 at 4:07:59 PM UTC-5, mic...@apps.guidero.us wrote:
> On Saturday, February 10, 2018 at 7:52:26 PM UTC-8, mjm...@aol.com wrote:
> > It is expected. All bits read except the high bit are "vapor" bits left in
> > the capacitance of the floating bus, since the status reads only drive the
> > high bit. 
> 
> On real hardware in the range $C000-$C01F, the low 7 bits generally reflect the last key pressed.  Hence why Anthony is getting $0D or $8D on $C018, because the last key one usually presses in order to see output is RETURN.
> 
> Many emulators get this wrong and either float the bus except on $C000 and $C010, have the other bits being 0, or some bizarre combination that doesn't reflect the real hardware.
> 
> MG

Oh.... my..... gawsh.... :O Mind blown! Love it!

Do we have this and other such arcane knowledge encapsulated neatly into a single codex of ultimate wisdom somewhere?

[toc] | [prev] | [next] | [standalone]


#4213

FromAntoine Vignau <antoine.vignau@laposte.net>
Date2018-02-11 13:50 -0800
Message-ID<897da71a-b88c-4f0e-be4d-4833299e9c3d@googlegroups.com>
In reply to#4211
On Sunday, February 11, 2018 at 10:07:59 PM UTC+1, mic...@apps.guidero.us wrote:
> On Saturday, February 10, 2018 at 7:52:26 PM UTC-8, mjm...@aol.com wrote:
> > It is expected. All bits read except the high bit are "vapor" bits left in
> > the capacitance of the floating bus, since the status reads only drive the
> > high bit. 
> 
> On real hardware in the range $C000-$C01F, the low 7 bits generally reflect the last key pressed.  Hence why Anthony is getting $0D or $8D on $C018, because the last key one usually presses in order to see output is RETURN.
> 
> Many emulators get this wrong and either float the bus except on $C000 and $C010, have the other bits being 0, or some bizarre combination that doesn't reflect the real hardware.
> 
> MG

Please correct me if I am wrong but what you write is right for pre-IIe machines. For IIe machines and after, values in that range (apart from the keyboard and its strobe) are not affected by the pressed key.

Antoine

[toc] | [prev] | [next] | [standalone]


#4214

FromMG <michael@apps.guidero.us>
Date2018-02-11 14:58 -0800
Message-ID<ef13714e-ab3f-4c3a-8d66-d418ac3d81bb@googlegroups.com>
In reply to#4213
On Sunday, February 11, 2018 at 1:50:30 PM UTC-8, Antoine Vignau wrote:
> Please correct me if I am wrong but what you write is right for pre-IIe machines. For IIe machines and after, values in that range (apart from the keyboard and its strobe) are not affected by the pressed key.

Well, here's my //e:  https://imgur.com/a/AGu2t

In the second photo, I quickly hit the Q key after pressing enter.

MG

[toc] | [prev] | [next] | [standalone]


#4209

Fromgids.rs@sasktel.net
Date2018-02-10 22:56 -0800
Message-ID<93e9f7db-9e21-414f-8248-d9e164e7ff21@googlegroups.com>
In reply to#4206
> Also, I tried a small basic program in sather's book (page 5-27) and it freezes AppleWin :
> 
> 10 POKE -16383,0 : REM SET 80STORE
> 20 POKE -16299,0 : REM PAGE2 = AUX = EVEN
> 30 POKE 1024,193 : REM DISPLAY "A" AT TOP LEFT
> 
> Is this a bug or am I missing something?


Leaving the softswitches pointing to Aux memory when exiting basic is not a good thing.  Just complete it with these lines

40 POKE -16300,0
50 POKE -16384,0

[toc] | [prev] | [next] | [standalone]


#4215

FromBrian Patrie <bpatrie@bellsouth.spamisicky.net>
Date2018-02-12 21:07 -0600
Message-ID<p5tkos$n6o$1@gioia.aioe.org>
In reply to#4206
On 2018-02-10 18:48, Anthony Ortiz wrote:
> Also, I tried a small basic program in sather's book (page 5-27) and it freezes AppleWin :
> 
> 10 POKE -16383,0 : REM SET 80STORE
> 20 POKE -16299,0 : REM PAGE2 = AUX = EVEN
> 30 POKE 1024,193 : REM DISPLAY "A" AT TOP LEFT
> 
> Is this a bug or am I missing something?

It took me a minute to realize what's happening here.  The (emulated) 
machine is not freezing.  It's just that the writes to the display are 
all going to aux-mem; and, since it's in 40-column mode, you can't see 
them.  (It's fine in 80-column mode.)  POKE -16300,0 to get writes going 
back to main-mem.

[toc] | [prev] | [next] | [standalone]


#4216

FromAnthony Ortiz <anthonypaulo@gmail.com>
Date2018-02-14 18:30 -0800
Message-ID<daf3c98e-901b-4100-a48f-b5e82d4bfbe0@googlegroups.com>
In reply to#4215
On Monday, February 12, 2018 at 10:07:12 PM UTC-5, Brian Patrie wrote:
> On 2018-02-10 18:48, Anthony Ortiz wrote:
> > Also, I tried a small basic program in sather's book (page 5-27) and it freezes AppleWin :
> > 
> > 10 POKE -16383,0 : REM SET 80STORE
> > 20 POKE -16299,0 : REM PAGE2 = AUX = EVEN
> > 30 POKE 1024,193 : REM DISPLAY "A" AT TOP LEFT
> > 
> > Is this a bug or am I missing something?
> 
> It took me a minute to realize what's happening here.  The (emulated) 
> machine is not freezing.  It's just that the writes to the display are 
> all going to aux-mem; and, since it's in 40-column mode, you can't see 
> them.  (It's fine in 80-column mode.)  POKE -16300,0 to get writes going 
> back to main-mem.

You're right, it wasn't frozen and the poke got me back; however, no A was displayed in upper left. Was Sather smoking some of the good stuff?

[toc] | [prev] | [next] | [standalone]


#4218

FromBrian Patrie <bpatrie@bellsouth.spamisicky.net>
Date2018-02-15 00:22 -0600
Message-ID<p638vi$194n$1@gioia.aioe.org>
In reply to#4216
On 2018-02-14 20:30, Anthony Ortiz wrote:
> On Monday, February 12, 2018 at 10:07:12 PM UTC-5, Brian Patrie wrote:
>> On 2018-02-10 18:48, Anthony Ortiz wrote:
>>> Also, I tried a small basic program in sather's book (page 5-27) and it freezes AppleWin :
>>>
>>> 10 POKE -16383,0 : REM SET 80STORE
>>> 20 POKE -16299,0 : REM PAGE2 = AUX = EVEN
>>> 30 POKE 1024,193 : REM DISPLAY "A" AT TOP LEFT
>>>
>>> Is this a bug or am I missing something?
>>
>> It took me a minute to realize what's happening here.  The (emulated)
>> machine is not freezing.  It's just that the writes to the display are
>> all going to aux-mem; and, since it's in 40-column mode, you can't see
>> them.  (It's fine in 80-column mode.)  POKE -16300,0 to get writes going
>> back to main-mem.
> 
> You're right, it wasn't frozen and the poke got me back; however, no A was displayed in upper left. Was Sather smoking some of the good stuff?

The A also went to aux-mem.  POKE -16371,0 to (messily) set 80-column 
mode without clearing the screen, and you'll see it.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.sys.apple2.programmer


csiph-web