Author Topic: Albireo - USB/SD/Serial interface for CPC  (Read 65444 times)

0 Members and 1 Guest are viewing this topic.

Online TotO

  • 6128 Plus
  • ******
  • Posts: 3.639
  • Country: fr
    • ?area=showdonations;u=4
  • Liked: 2764
  • Likes Given: 1661
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #450 on: 16:42, 16 April 20 »
I have never understood why it was required to swap the buttons for left-handled peoples, when the brain already do that.  ;D
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

Offline PulkoMandy

  • 464 Plus
  • *****
  • Posts: 364
  • Country: fr
  • Liked: 284
  • Likes Given: 1
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #451 on: 16:58, 16 April 20 »
Well my main mouse is left-handed in hardware which adds even more confusion to this, so... (but it also wouldn't work with this code, too many mousewheels)

Offline GUNHED

  • 6128 Plus
  • ******
  • Posts: 1.802
  • Country: de
  • Reincarnation of TFM
    • FutureOS - The quickest OS for the CPC and Plus
  • Liked: 792
  • Likes Given: 2046
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #452 on: 21:22, 16 April 20 »
Hi, Slarti (#66 on the waiting list) just asked me to guess how long it could take to get his Albireo.
It there any plan in making more boards? Any kind of time schedule or guess? It would be great to get some kind of hint.  :)
http://futureos.de --> Get the revolutionary FutureOS (Recent update: 2019.08.07)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2019.08.14)

Offline PulkoMandy

  • 464 Plus
  • *****
  • Posts: 364
  • Country: fr
  • Liked: 284
  • Likes Given: 1
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #453 on: 21:58, 16 April 20 »
I think I mentionned it earlier, I transferred all the production efforts to CloudStrife. He has the PCBs and chips and should be assembling them. So this is not under my control.
If anyone else wants to assemble boards, all the hardware schematics and PCB designs are available, as well (there are small chips, so it needs some skills and/or appropriate tools).
I don't currently plan to assemble more of these myself.

Online Targhan

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.098
  • Country: fr
  • Liked: 1018
  • Likes Given: 151
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #454 on: 00:20, 17 April 20 »
@PulkoMandy Watch out for a terrible bug in your annotated code! "AlbireoReadDat": I typed "rre" instead of "ret"!!!

As for the mouse buttons, it seems it's "all right" now. Bit 0 is left button, bit 1 is right, bit 2 is middle. I don't understand what was going on.
« Last Edit: 00:29, 17 April 20 by Targhan »
Targhan/Arkos

Arkos Tracker 2 - alpha 8 now released! - Follow the news on Twitter!
Disark A cross-platform Z80 disassembler/source converter

Imperial Mahjong
Orion Prime

Offline PulkoMandy

  • 464 Plus
  • *****
  • Posts: 364
  • Country: fr
  • Liked: 284
  • Likes Given: 1
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #455 on: 13:48, 17 April 20 »
Thanks, updated :)


I also included the note about "boot mode" there.

Online Targhan

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.098
  • Country: fr
  • Liked: 1018
  • Likes Given: 151
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #456 on: 14:56, 17 April 20 »
@PulkoMandy I think there is another bug somewhere. On CPC cold start, when starting the code, the Albireo's mouse is not responsive at all (though, thanks to the white border, we can see it "see" something (a few scanlines are white). The rest of the code works fine (cursor, joystick, etc.).

I do a reset (via a reset button), run the program again and it works fine this time. Something wrong on the init maybe?
Targhan/Arkos

Arkos Tracker 2 - alpha 8 now released! - Follow the news on Twitter!
Disark A cross-platform Z80 disassembler/source converter

Imperial Mahjong
Orion Prime

Offline GUNHED

  • 6128 Plus
  • ******
  • Posts: 1.802
  • Country: de
  • Reincarnation of TFM
    • FutureOS - The quickest OS for the CPC and Plus
  • Liked: 792
  • Likes Given: 2046
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #457 on: 15:11, 17 April 20 »
@PulkoMandy I think there is another bug somewhere. On CPC cold start, when starting the code, the Albireo's mouse is not responsive at all (though, thanks to the white border, we can see it "see" something (a few scanlines are white). The rest of the code works fine (cursor, joystick, etc.).

I do a reset (via a reset button), run the program again and it works fine this time. Something wrong on the init maybe?


Actually, that's pretty much the same problem I had for a long time. Slowly we're getting closer... Hope this problem can be addressed.

http://futureos.de --> Get the revolutionary FutureOS (Recent update: 2019.08.07)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2019.08.14)

Offline PulkoMandy

  • 464 Plus
  • *****
  • Posts: 364
  • Country: fr
  • Liked: 284
  • Likes Given: 1
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #458 on: 15:34, 17 April 20 »

1) According to the docs, changing USB modes can take 10us, so maybe a few NOPs at lines 32 (where you have "basic: 110") will help with that.


Extra safety:
After waiting for command #15, you can also read the data register, which should return #51 (success) or #5f (failure). This can happen if no USB device is connected to the Albireo.
Likewise, after calling command #22 in AlbireoWaitForCommandEnd, you can read the data register and check bit 5, which is set if the command failed.


2) You can try to do a complete reset sequence for the USB device:



        ld a,#15 : call AlbireoCmd
        ld a,#5 : call AlbireoDat
        ; ... wait 10 NOPs ...


        ld a,#15 : call AlbireoCmd
        ld a,#7 : call AlbireoDat
        ; ... wait 10 NOPs ...
        ld a,#15 : call AlbireoCmd
        ld a,#6 : call AlbireoDat



3) You can also try to start with a complete reset of the Albireo at the start, to make sure it is in a known state. Write 5 to the CMD port and wait at least 35 milliseconds (3 times call &bd19 would do).


4) If you use a reset button, is switch n.2 on your Albireo set to ON (this is the default when the boards are shipped, but maybe you changed it)? This would let the reset button reset the Albireo as well, so it doesn't need to be done in software (at least step 3 above shouldn't be needed then)

Online Targhan

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.098
  • Country: fr
  • Liked: 1018
  • Likes Given: 151
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #459 on: 17:25, 17 April 20 »
Thanks!

Plan 1 worked:
I added
ld b,180 : djnz $
Just after

        ;Basic: 100
        ld a,#15 : call AlbireoCmd
        ld a,#7 : call AlbireoDat

I used 180 to be on the safe side: something like 130 is minimum.

Quote
After waiting for command #15, you can also read the data register, which should return #51 (success) or #5f (failure). This can happen if no USB device is connected to the Albireo.

I tried to do that after the first command #15 (and #7 on DAT), but the result was unpredictable: the mouse didn't response after a short while. Reading the "data register" is simply calling AlbireoReadDat, right?
Targhan/Arkos

Arkos Tracker 2 - alpha 8 now released! - Follow the news on Twitter!
Disark A cross-platform Z80 disassembler/source converter

Imperial Mahjong
Orion Prime

Offline PulkoMandy

  • 464 Plus
  • *****
  • Posts: 364
  • Country: fr
  • Liked: 284
  • Likes Given: 1
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #460 on: 17:30, 17 April 20 »
Yes, right. So I don't understand the docs (badly translated from chinese, it's not always easy)

Online Targhan

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.098
  • Country: fr
  • Liked: 1018
  • Likes Given: 151
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #461 on: 18:26, 17 April 20 »
Have a go if you want :).
But with all that we have, I think the result is now fairly good! And it looks reliable to me.
Targhan/Arkos

Arkos Tracker 2 - alpha 8 now released! - Follow the news on Twitter!
Disark A cross-platform Z80 disassembler/source converter

Imperial Mahjong
Orion Prime

Offline VintageAdvantage

  • CPC664
  • ***
  • Posts: 78
  • Country: us
  • Liked: 11
  • Likes Given: 23
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #462 on: 18:18, 21 April 20 »
Not really interested in a mouse interface.
Can I put in a SD card into the Alberto and use it as a DF1 disk drive?


Offline PulkoMandy

  • 464 Plus
  • *****
  • Posts: 364
  • Country: fr
  • Liked: 284
  • Likes Given: 1
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #463 on: 19:15, 21 April 20 »
It does not emulate a floppy drive. There is a work in progress ROM allowing access to the SD-Card in AMSDOS compatible way. So software that uses the AMSDOS ROM for access works, but not anything that programs the floppy controller directly.

Offline Tone-la

  • Speccy
  • *
  • Posts: 1
  • Country: gb
  • Liked: 1
  • Likes Given: 0
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #464 on: 18:24, 20 May 20 »
@PulkoMandy re post  [size=0px]#453[/size] can you point me to the gerber and BOM info is for the latest Albireo board, I'd happily have a go at some construction.  I'm not a professional (it's not my trade), but am competent and keen.  This is a fantastic project / concept and I'd love to help with the hardware and if possible the firmware / software too


Offline PulkoMandy

  • 464 Plus
  • *****
  • Posts: 364
  • Country: fr
  • Liked: 284
  • Likes Given: 1
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #465 on: 18:55, 20 May 20 »
I apparently didn't store the Gerber files anywhere, but they can be generated from the Kicad project which is here: https://github.com/pulkomandy/avrstuff/tree/master/CPC stuff/ch376

Offline VintageAdvantage

  • CPC664
  • ***
  • Posts: 78
  • Country: us
  • Liked: 11
  • Likes Given: 23
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #466 on: 20:42, 20 May 20 »
There is a lot that can go wrong with Gerbers export in kicad. It is not that simple!!
You should provide an official version and then pass on the work. You can also send it to China for assembly service.

Offline PulkoMandy

  • 464 Plus
  • *****
  • Posts: 364
  • Country: fr
  • Liked: 284
  • Likes Given: 1
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #467 on: 21:06, 20 May 20 »
I agree, but I forgot to save the file back when I ordered the boards (that was 3 years ago) and there isn't a lot I can do about it right now except hoping that I can still load this fine in kicad and export it again. But then it will be as untested as if anyone else does it.