Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > CSDb Discussions > Error message: "Found more than one drive on IEC bus" with C128D metal and recent demos
2017-11-08 10:26
Monte Carlos

Registered: Jun 2004
Posts: 350
Error message: "Found more than one drive on IEC bus" with C128D metal and recent demos

Sorry for this lamer question. I use an C128D(metal), currently (although i have used C64 for years until i got room problems with the complete setup).
I have attached a 1541 ultimate and changed the internal 1571 drive to device no 10 by cutting the solder pads. The ultimate has dev no 8. This way i can watch many, mostly old, demos with 1541U. However, the most current demos always complain about more than one drive being enabled. Ok, i thought, plugging off the internal 1571 from the mainbord should fix the problem. I was wrong. The loaders still complain about more than one drive.
Am i wrong with my understanding that plugging off the internal drive also disables the ATN signal?
 
... 34 posts hidden. Click here to view all posts....
 
2017-11-11 14:01
Krill

Registered: Apr 2002
Posts: 2804
Here it is now, a little program to silence offending drives when running demos with 2-bit+ATN loaders. This one is hardcoded for #9. ACME source. Not tested on realthing yet.

        tightloop = 0; 1 might work better on 1541, 0 might work better on 1571

        !to "busoff.prg", cbm

        * = $0801

        !word 2048, 2017; link, line number
        !byte $9e; SYS
        !text "2064"
        !byte 0, 0, 0; end

        !text "+H!"

        lda #9   ; device number
        jsr listen

!if tightloop {
        ldx #0
datalo: lda atnlo,x
        jsr $ffa8; IECOUT
        inx
        cpx #atnloend - atnlo
        bne datalo
        jsr $ffae; UNLSTN

        lda $ae  ; FA
        jsr listen
        ldx #0
datahi: lda atnhi,x
        jsr $ffa8; IECOUT
        inx
        cpx #atnhiend - atnhi
        bne datahi
        jsr $ffae; UNLSTN

        lda $ae  ; FA
        jsr listen
}
        ldx #0
exec:   lda command,x
        jsr $ffa8; IECOUT
        inx
        cpx #endcommand - command
        bne exec
        jmp $ffae; UNLSTN

listen: ldx #0
        stx $90  ; STATUS
        sta $ae  ; FA
        jsr $ffb1; LISTEN
        lda #$6f ; open channel 15 (command/error channel)
        jsr $ff93; LSTNSA
        lda $90
        bmi error
        rts

error:  brk

command:
        !text "M-E"; memory-execute
        !word drivecode
!pseudopc $0205 {
drivecode:
    !if tightloop = 0 {
        ; the simple approach
        sei
        lda #$20
        sta $1801; 2 MHz on 1571
        lda #$00 ; ATNA cleared, CLK OUT low, DATA OUT low
        ldx #$10 ; ATNA set, CLK OUT low, DATA OUT low
--      bit $1800; wait for ATN IN high
        bpl --
        stx $1800; set ATNA
-       bit $1800; wait for ATN IN low
        bmi -
        sta $1800; clear ATNA
        bpl --   ; loop
    } else {
        ; the not-so-simple approach
        sei
        lda #$ff
        sta $1803; set all port bits as outputs
        lda #>$0300
        sta $1801
        lda #$7f
        sta $1802; set only ATN IN as input
        lda #$00 ; ATNA cleared, CLK OUT low, DATA OUT low
        ldx #$10 ; ATNA set, CLK OUT low, DATA OUT low
        sta $1800
        jmp ($1800)
    }
} 
endcommand:

!if tightloop {
atnlo:  !text "M-W"; memory-write
        !word $0300
        !byte $16
        jmp ($1800)
        !byte 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
        sta $1800
        jmp ($1800)
atnloend:

atnhi:  !text "M-W"; memory-write
        !word $0380
        !byte $13
        stx $1800
        jmp ($1800)
        !byte 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
        jmp ($1800)
atnhiend:
}
2017-11-12 21:40
Monte Carlos

Registered: Jun 2004
Posts: 350
Wow that was fast. I'm very curious to test it on the real hw.
2017-11-13 09:49
Krill

Registered: Apr 2002
Posts: 2804
Would be cool if you could check both variants. Both should work, but i'm not so sure about various bus setups. The internal 1571 has the shortest physical path to the host computer's serial port, so it should all just work.

Anyhow, if your tests prove successful, i can safely add this feature to the loader. :)
2017-11-13 11:03
Bitbreaker

Registered: Oct 2002
Posts: 498
Might shamelessly copy that, been too lazy so far :-)
2017-11-13 11:24
Krill

Registered: Apr 2002
Posts: 2804
As long as i show up in the credits under "help" or "additional code" or something, all is well. Open source works fine as long as there is proper attribution. :)
2017-11-13 15:59
Monte Carlos

Registered: Jun 2004
Posts: 350
Hhhm, i just compiled it with acme (compiled without problems). However, when executed i just get the ready prompt as with run/stop restore. Maybe something went wrong when the src was copied into csdb? Or do i have to specify specific compile options? I disassembled code which showed that branch and jump targets were ok.
2017-11-13 16:05
Krill

Registered: Apr 2002
Posts: 2804
It executes a BRK if there's an error, such as device not present. Have you changed "lda #9 ; device number" to #10 for your setup?
2017-11-13 16:37
Monte Carlos

Registered: Jun 2004
Posts: 350
Ahh fuck,sorry!
2017-11-14 13:47
Monte Carlos

Registered: Jun 2004
Posts: 350
So now some good new:

I tested FLT K9 orange with three settings and displayed active drives beforehand. Drive 8 = 1541u, drive 11=1571:

1.) No script ran -> Drive 8 and 11 shown as active.
Demo loader outputs error message that more than one drive is on the bus

2.) Ran script "OPEN 1,11,15,"M-W"+CHR$(119)+CHR$(0)+CHR$(2)+CHR$(0)+CHR$(0):CLOSE 1" to disable drive 11 -> Only drive 8 shown as active. Demo loader does not output error message but instead just hangs up.

3.) Ran Krills script -> Only drive 8 shown as active. Demo loader works perfectly.

I now created a folder 0_scripts in the base dir of the 1571U and put all those successful and unsuccessful code attemps into a d64 in this folder. This way i can quickly disable the internal 1571 before running any demos.
As remarked by Skate, the d64 should be mounted before running any contents. If they are run directly, you will not receive the "ready." prompt after code has been run.
2017-11-14 14:14
Krill

Registered: Apr 2002
Posts: 2804
Okay, cool, but do both variants work nicely, with and without "tightloop" enabled? :)
Previous - 1 | 2 | 3 | 4 | 5 - 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
t0m3000/ibex-crew
Jetboy/Elysium
Mason/Unicess
Dano/Padua
Yugorin/Samar Produc..
iAN CooG/HVSC
Freeze/Blazon
Scooby/G★P/Light
Guests online: 322
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 No Bounds  (9.6)
6 Comaland 100%  (9.6)
7 Uncensored  (9.6)
8 The Ghost  (9.6)
9 Wonderland XIV  (9.6)
10 Bromance  (9.6)
Top onefile Demos
1 Party Elk 2  (9.7)
2 Cubic Dream  (9.6)
3 Copper Booze  (9.5)
4 Rainbow Connection  (9.5)
5 TRSAC, Gabber & Pebe..  (9.5)
6 Onscreen 5k  (9.5)
7 Dawnfall V1.1  (9.5)
8 Quadrants  (9.5)
9 Daah, Those Acid Pil..  (9.5)
10 Birth of a Flower  (9.5)
Top Groups
1 Booze Design  (9.3)
2 Nostalgia  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Musicians
1 Rob Hubbard  (9.7)
2 Jeroen Tel  (9.7)
3 Mutetus  (9.6)
4 Linus  (9.6)
5 Jammer  (9.6)

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