Megalextoria
Retro computing and gaming, sci-fi books, tv and movies and other geeky stuff.

Home » Digital Archaeology » Computer Arcana » Apple » Apple II » Mouse in Basic
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Mouse in Basic [message #382539] Thu, 28 March 2019 17:10 Go to next message
Anonymous
Karma:
Originally posted by: ncutter1120

Hello,

I want to write a program in applesoft basic utilizing a mouse but I am not
sure how to access the mouse from applesoft(if that is even possible).

Any help is appreciated
Thanks in advance

Raymond
Mouse in Basic [message #382540 is a reply to message #382539] Thu, 28 March 2019 17:17 Go to previous messageGo to next message
Antoine Vignau is currently offline  Antoine Vignau
Messages: 1860
Registered: October 2012
Karma: 0
Senior Member
Read page 206 of http://www.apple-iigs.info/doc/fichiers/iigsfirmware1.pdf

Compatible with all Apple IIs.

av
Re: Mouse in Basic [message #382545 is a reply to message #382540] Thu, 28 March 2019 20:45 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: ncutter1120

On Thursday, March 28, 2019 at 5:17:40 PM UTC-4, Antoine Vignau wrote:
> Read page 206 of http://www.apple-iigs.info/doc/fichiers/iigsfirmware1.pdf
>
> Compatible with all Apple IIs.
>
> av

Ok, now that I can access the mouse from applesoft, I have started to write my program. Along the way, I have ran into another problem. I am trying to use the GET command to read the ESC key but it seems that no matter where I put the code for it, the apple II just ignores it.

Thanks,
Raymond
Re: Mouse in Basic [message #382552 is a reply to message #382545] Fri, 29 March 2019 04:49 Go to previous messageGo to next message
Antoine Vignau is currently offline  Antoine Vignau
Messages: 1860
Registered: October 2012
Karma: 0
Senior Member
You can use the basic cmd WAIT as in WAIT -16384,128
It will return if a key is pressed, then PEEK the same address.

Read 3.3 of https://fjkraan.home.xs4all.nl/comp/apple2faq/app2asoftfaq.h tml

A useful tutorial @ http://www.hoist-point.com/applesoft_basic_tutorial.htm

The esc key is used as an esc code to handle extra commands, it is first used by the firmware, that's why you should use another trick to get its code.

Antoine
Re: Mouse in Basic [message #382555 is a reply to message #382552] Fri, 29 March 2019 15:05 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: Anthony Adverse

Learn something new every other day... I've never even seen a reference to a wait statement before, had to go away and look it up. Nice work.

A
Re: Mouse in Basic [message #382562 is a reply to message #382555] Fri, 29 March 2019 15:37 Go to previous messageGo to next message
David Schmidt is currently offline  David Schmidt
Messages: 994
Registered: October 2012
Karma: 0
Senior Member
On 3/29/19 3:05 PM, Anthony Adverse wrote:
> Learn something new every other day... I've never even seen a reference to a wait statement before, had to go away and look it up. Nice work.

Did you find out about the Microsoft Easter egg (in some BASIC dialects)
that is revealed with WAIT6502,1? I.e.:
https://www.c64-wiki.com/wiki/Microsoft#Easter_Egg_.28Micros oft.21.29
Re: Mouse in Basic [message #382565 is a reply to message #382555] Fri, 29 March 2019 18:10 Go to previous messageGo to next message
Steve Nickolas is currently offline  Steve Nickolas
Messages: 2039
Registered: October 2012
Karma: 0
Senior Member
On Fri, 29 Mar 2019, Anthony Adverse wrote:

> Learn something new every other day... I've never even seen a reference to a wait statement before, had to go away and look it up. Nice work.
>
> A
>

I frequently use "WAIT 49152,128:GET A$".

-uso.
Re: Mouse in Basic [message #382566 is a reply to message #382562] Fri, 29 March 2019 18:11 Go to previous messageGo to next message
Steve Nickolas is currently offline  Steve Nickolas
Messages: 2039
Registered: October 2012
Karma: 0
Senior Member
On Fri, 29 Mar 2019, David Schmidt wrote:

> On 3/29/19 3:05 PM, Anthony Adverse wrote:
>> Learn something new every other day... I've never even seen a reference to
>> a wait statement before, had to go away and look it up. Nice work.
>
> Did you find out about the Microsoft Easter egg (in some BASIC dialects) that
> is revealed with WAIT6502,1? I.e.:
> https://www.c64-wiki.com/wiki/Microsoft#Easter_Egg_.28Micros oft.21.29
>

That would be the second revision of BASIC on the Commodore PET, the one
that says ### COMMODORE BASIC ###.

-uso.
Re: Mouse in Basic [message #382571 is a reply to message #382565] Fri, 29 March 2019 23:21 Go to previous messageGo to next message
gids.rs is currently offline  gids.rs
Messages: 1395
Registered: October 2012
Karma: 0
Senior Member
On Friday, March 29, 2019 at 4:10:36 PM UTC-6, Steve Nickolas wrote:
> On Fri, 29 Mar 2019, Anthony Adverse wrote:
>
>> Learn something new every other day... I've never even seen a reference to a wait statement before, had to go away and look it up. Nice work.
>>
>> A
>>
>
> I frequently use "WAIT 49152,128:GET A$".
>
> -uso.


Personally, I prefer handling the ASCII value instead of alphabet characters.

KB = 49152: KC = 49168: WAIT KB,128: KY= PEEK(KB)-128: KY= KY-32*(KY>96): POKE KC,0

This eliminates the lowercase check for key presses.

How about these two?

WAIT 49249,128
WAIT 49250,128
Re: Mouse in Basic [message #382574 is a reply to message #382571] Sat, 30 March 2019 05:13 Go to previous message
Anonymous
Karma:
Originally posted by: Anthony Adverse

You mean I've been polling -16384 or whatever it is all this time I could've been using wait? sigh...

A
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: ][GS and DMA ram card.
Next Topic: Bad Apple movie on Apple II
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri May 10 17:42:23 EDT 2024

Total time taken to generate the page: 0.03777 seconds