Controlling the floppy drive LED

GFA, ASM, STOS, ...

Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team

Xyla
Atari nerd
Atari nerd
Posts: 47
Joined: Fri Jun 10, 2011 8:27 pm

Controlling the floppy drive LED

Postby Xyla » Fri Dec 15, 2017 1:25 am

A long time ago I used to know how to program the floppy drive LED to turn on and off. Just the LED, not the motor of course. But now I'm sad I can't remember how to do this, and going through my books I haven't been able to find wherever I learned the trick.

Could anyone here refresh my memory?

Thanks!

AtariZoll
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2978
Joined: Mon Feb 20, 2012 4:42 pm
Contact:

Re: Controlling the floppy drive LED

Postby AtariZoll » Fri Dec 15, 2017 1:33 am

PSG port 14, bit 1 for drive A. Low=LED on. High=LED off.
For more, I need to know what programming language you use.
And will need to disable Vblank access to that port too during light-show.
Famous Schrodinger's cat hypothetical experiment says that cat is dead or alive until we open box and see condition of poor animal, which deserved better logic. Cat is always in some certain state - regardless from is observer able or not to see what the state is.

Xyla
Atari nerd
Atari nerd
Posts: 47
Joined: Fri Jun 10, 2011 8:27 pm

Re: Controlling the floppy drive LED

Postby Xyla » Fri Dec 15, 2017 4:44 am

Thank you!!! I normally use GFA Basic, but for this program I'm using C (AHCCST)... specific information for either or both languages would be helpful.

User avatar
charles
10 GOTO 10
10 GOTO 10
Posts: 2219
Joined: Tue Aug 17, 2004 12:11 am
Location: ont. Canada
Contact:

Re: Controlling the floppy drive LED

Postby charles » Fri Dec 15, 2017 8:18 am

I think the code I used was called dioda .gfa
ill see if I can find it
atari is my lifestyle,not a hobby.
HOLD ON ! ! !,
Im printing unreadable characters ...!

User avatar
charles
10 GOTO 10
10 GOTO 10
Posts: 2219
Joined: Tue Aug 17, 2004 12:11 am
Location: ont. Canada
Contact:

Re: Controlling the floppy drive LED

Postby charles » Fri Dec 15, 2017 8:21 am

getting kinda cheep with the Christmas lights ya?
lol

Code: Select all


'  zapalanie i wygaszanie diody od stacji
'
> PROCEDURE ledon
  LOCAL s|
  SPOKE &HFF8800,14
  s|=PEEK(&HFF8800)
  s|=s| AND &X11111101
  SPOKE &HFF8800,14
  SPOKE &HFF8802,s|
RETURN
> PROCEDURE ledoff
  LOCAL s|
  SPOKE &HFF8800,14
  s|=PEEK(&HFF8800)
  s|=s| XOR 2
  SPOKE &HFF8800,14
  SPOKE &HFF8802,s|
RETURN
'
'


I think this is it ????
atari is my lifestyle,not a hobby.
HOLD ON ! ! !,
Im printing unreadable characters ...!

AtariZoll
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2978
Joined: Mon Feb 20, 2012 4:42 pm
Contact:

Re: Controlling the floppy drive LED

Postby AtariZoll » Fri Dec 15, 2017 9:09 am

Yep, it seems it. But is good to set flock system variable on, to prevent access to PSG in Vblank.
Flock is addres $43E - normally 0. You write there $FF to prevent access to PSG.
Famous Schrodinger's cat hypothetical experiment says that cat is dead or alive until we open box and see condition of poor animal, which deserved better logic. Cat is always in some certain state - regardless from is observer able or not to see what the state is.

User avatar
charles
10 GOTO 10
10 GOTO 10
Posts: 2219
Joined: Tue Aug 17, 2004 12:11 am
Location: ont. Canada
Contact:

Re: Controlling the floppy drive LED

Postby charles » Fri Dec 15, 2017 1:05 pm

you might b right ,, I know theres something about the Atari system which are shared ...ive seen another code somewhere to do this ,,,,
atari is my lifestyle,not a hobby.
HOLD ON ! ! !,
Im printing unreadable characters ...!


Social Media

     

Return to “Coding”

Who is online

Users browsing this forum: No registered users and 1 guest