English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 18 October 2016, 21:02   #1
mekhall
 
Posts: n/a
Hooooo Stopping the motor

I have a quite funny problem.

I just finished coding my first (and last?) demo and thought that I should at least put it on a floppy disk to wrap the project up. Since I'm running on an emulator that would be a virtual floppy, an adf-file.

I made a startup-sequence which simply starts my demo, and that works.

However, the (virtual) floppy driver motor is running when my demo starts and it does not stop running until I exit my demo... So it is emitting a (fake) motor sound all the time, ruining the music.

So, I thought that there must be a way to stop the motor. I've played around a bit with the DSKMOTOR bit of CIAAPRB register, but it does not seem to have an effect.

I do not really want to write a trackloader or something like that...

Any ideas of how my to stop the disk motor?
 
Old 18 October 2016, 22:30   #2
Cylon
Registered User
 
Join Date: Oct 2014
Location: Europe
Posts: 471
Give the system a few seconds to finish disk handling before taking over the machine. then the motor will stop by itself.
Cylon is offline  
Old 18 October 2016, 22:33   #3
mekhall
 
Posts: n/a
Hm.. So there is no way of controlling the motor yourself?
Is there any way to at least poll for whether the motor is still running or not?
 
Old 18 October 2016, 22:54   #4
Galahad/FLT
Going nowhere
 
Galahad/FLT's Avatar
 
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 9,004
Quote:
Originally Posted by mekhall View Post
I have a quite funny problem.

I just finished coding my first (and last?) demo and thought that I should at least put it on a floppy disk to wrap the project up. Since I'm running on an emulator that would be a virtual floppy, an adf-file.

I made a startup-sequence which simply starts my demo, and that works.

However, the (virtual) floppy driver motor is running when my demo starts and it does not stop running until I exit my demo... So it is emitting a (fake) motor sound all the time, ruining the music.

So, I thought that there must be a way to stop the motor. I've played around a bit with the DSKMOTOR bit of CIAAPRB register, but it does not seem to have an effect.

I do not really want to write a trackloader or something like that...

Any ideas of how my to stop the disk motor?

Try this:

lea $bfd100,a5
bset #7,(a5)
bset #6(a5)
bset #5(a5)
bset #4(a5)
bset #3(a5)
Galahad/FLT is offline  
Old 18 October 2016, 23:08   #5
phx
Natteravn
 
phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,500
Important in CIABRPB ($bfd100) are:
Code:
Bit 7: /MOTOR (active low)
Bit 6: /DSKSEL3 (active low)
Bit 5: /DSKSEL2 (active low)
Bit 4: /DSKSEL1 (active low)
Bit 3: /DSKSEL0 (active low)
Whenever you select a drive (transition of the select-bit from high to low) it will remember the state of the MOTOR bit.

So, to turn all drive motors off, I am using this code:
Code:
        lea     $bfd100,a0
        or.b    #$f8,(a0)
        nop
        and.b   #$87,(a0)
        nop
        or.b    #$78,(a0)
        nop
1. Set MOTOR-off bit and deselect all drives.
2. Select all drives, which makes them aware of the MOTOR-off state.
3. Deselect all drives again.
phx is offline  
Old 19 October 2016, 18:07   #6
mekhall
 
Posts: n/a
I tried the solution from phx, and it works great!

Thank you!

Now I can get peace of mind and release my demo.
 
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Indivision AGA Mk2 stopping boot-up Wiffleplop Hardware mods 8 24 June 2014 13:11
Stopping WinUAE from creating and looking in Documents. FOL support.WinUAE 6 11 June 2013 00:02
a600 floppy motor tomcat666 support.Hardware 3 30 March 2013 07:49
Sound stopping and starting stainy support.WinUAE 3 27 November 2006 20:32
jimmy white whirlwind snooker stopping JSemple3 New to Emulation or Amiga scene 6 21 June 2004 15:22

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 19:41.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.10111 seconds with 13 queries