Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user Erik_Bam ! (Registered 2024-05-26) You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > 1541 low level programming problem
2007-08-21 19:04
Peiselulli

Registered: Oct 2006
Posts: 81
1541 low level programming problem

Hello,
I have a problem that I don't understand. I tried the
following code for the 1541 :

    jsr $F97E       ; MOTOR_ON
    jsr $fe00       ; SET_READ_MODE
loop
    BIT $1C00       ; SYNC signal
    BMI loop        ; not yet found?
    LDA $1C01       ; read byte
    lda $1c00
    eor #$08
    sta $1c00
    CLV
-
    bvc -
    lda $1c01
    jmp loop


I expect (if a floppy is inserted) that the LED flickers, but it does not. If I remove the "bvc" command, it works like expected. Has anybody a idea what I have forgotten to initialize ?

 
... 10 posts hidden. Click here to view all posts....
 
2007-08-22 19:11
Peiselulli

Registered: Oct 2006
Posts: 81
yes, it did.
is there something to initalize that i have forgotten ?
2007-08-22 19:14
Krill

Registered: Apr 2002
Posts: 2854
Also from my loader:
            lda #CB2_OUTPUT_HIGH | CB1_IRQ_ON_NEG_ACTIVE_EDGE | CA2_OUTPUT_HIGH | CA1_IRQ_ON_NEG_ACTIVE_EDGE
            sta VIA2_PCR

This is an lda #$ee sta $1c0c, maybe that fixes it?
2007-08-22 19:16
Peiselulli

Registered: Oct 2006
Posts: 81
many thanks, that was missing !
now it flickers :->
2007-08-22 19:21
Krill

Registered: Apr 2002
Posts: 2854
Greatness :)
2007-08-22 23:21
Graham
Account closed

Registered: Dec 2002
Posts: 990
Also, I'd add a wait loop after turning the motor on. It takes some time until it has 100% speed.

Oh and for searching a sync, you can use the routine at $F556.
Previous - 1 | 2 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
eryngi
Guests online: 79
Top Demos
1 Next Level  (9.8)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Aliens in Wonderland  (9.7)
5 Coma Light 13  (9.7)
6 Edge of Disgrace  (9.6)
7 No Bounds  (9.6)
8 Comaland 100%  (9.6)
9 Uncensored  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 Layers  (9.6)
2 It's More Fun to Com..  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 TRSAC, Gabber & Pebe..  (9.5)
7 Rainbow Connection  (9.5)
8 Dawnfall V1.1  (9.5)
9 Daah, Those Acid Pil..  (9.5)
10 Birth of a Flower  (9.5)
Top Groups
1 Covert Bitops  (9.4)
2 Nostalgia  (9.4)
3 Oxyron  (9.3)
4 Booze Design  (9.3)
5 Crest  (9.3)
Top Fullscreen Graphicians
1 Sulevi  (9.9)
2 Carrion  (9.8)
3 Joe  (9.8)
4 Duce  (9.8)
5 Mirage  (9.7)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.036 sec.