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

0 Members and 1 Guest are viewing this topic.

Offline dirtybb

  • CPC664
  • ***
  • Posts: 68
  • Country: fr
  • Liked: 28
  • Likes Given: 96
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #50 on: 01:29, 21 October 15 »
Hi,
I'm in for one. Thanks !

Offline Dubliner

  • CPC664
  • ***
  • Posts: 75
  • Country: es
  • Liked: 92
  • Likes Given: 4
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #51 on: 09:02, 21 October 15 »
Hi,

Count 1 board for me as well :)

Offline Vandalsk

  • CPC464
  • **
  • Posts: 13
  • Country: de
  • Liked: 4
  • Likes Given: 80
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #52 on: 20:08, 21 October 15 »
Netter Avatar!  ;) ;D

Passt zu meinem Vornamen :-D Von der Haartracht .... bin ich eher das Gegenteil. :-D
- Schneider CPC 6128 & 3,5" Floppy, Multiface II, Videodigitizer, Symbiface II, Dobbertin Ram Expansion 512 Kb, Marconi Trackball, CPC Booster+, X-Board, X-Mem, HXC Floppy Emulator
- Sinclair PC 200
- Schneider PC 1640
- Atari STf
- Vtech Laser 310, 64 KB Ram, PI 20 Printer Interface,  LP 20 Lightpen, Laser JI 20 Joysticks, Erweiterungsplatine, PP40 Plotter, DD 20 5,25" Floppy, SANYO DM 2112 Monitor
Amstrad NC-100
Atari ST 1040
Amiga 500
Commodore C 64

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1976
  • Likes Given: 4650
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #53 on: 20:32, 21 October 15 »
What I found on a quick search...


« Last Edit: 20:37, 21 October 15 by TFM »
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline PulkoMandy

  • 464 Plus
  • *****
  • Posts: 338
  • Country: fr
  • Liked: 269
  • Likes Given: 1
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #54 on: 22:09, 21 October 15 »

Current waiting list
0 - PulkoMandy
1 - OffseT
2 - TFM (x2)
4 - ||C||-||E||
5 - majikeyric (x2)
7 - CraigsBar (x2)
9 - pelrun
10 - Optimus
11 - AsT
12 - Gryzor
13 - hsimpson
14 - SOS
15 - tonio8bits (x2)
17 - Audronic
18 - gros_minet
19 - Fessor
20 - Sykobee (Briggsy)
21 - skywalky
22 - Jungsi
23 - Poliander
24 - Yannis_uno
25 - Rennert
26 - HAL6128
27 - Joseman
28 - Tai
29 - Grim
30 - reidrac
31 - cosa_nostra_6128
32 - Targhan
33 - oratyper
34 - NiNxPe
35 - Vandalsk (x2)
37 - Dirtybb
38 - Dubliner
39 - ronaldo (x2)


Latest changes
Today I replaced the FT230X with an FT231X. This is the chip doing usb<>serial conversion for the high speed link. The reasons for this:
  • Supplier is out of stock for FT230X
  • The FT231X has the standard modem control lines, which I used for the "remote control" feature instead of a special GPIO pin. This means the remote control (reset or interrupt triggered from the other computer plugged to the USB port) can be used with the VCP drivers from FTDI, no need to use the D2XX driver. This makes it easier to use it, and also possibly more compatible.
  • It is only 4 more pins to solder (20 instead of 16), and I think it's worth the extra effort.
I'm fairly happy with the design now. I will start ordering the chips and make a final check that all footprints are correct on paper. Then I'll order a first batch of 5 boards and try to make them work (these will be "version 0.9" boards). If there are any problems found, I will fix them and then order a bigger batch. I don't want to order 50 boards now and be left with unusable boards because I made a mistake somewhere.
« Last Edit: 12:48, 22 October 15 by PulkoMandy »

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1976
  • Likes Given: 4650
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #55 on: 01:02, 22 October 15 »
You are right about that. Please take your time for testing and debugging if needed. I'm sure we all are willing to wait longer and get a reliable product.  :) :) :)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline Cpcmaniaco

  • Supreme Wiki Contributor
  • CPC6128
  • ****
  • Posts: 160
  • Country: es
  • Liked: 40
  • Likes Given: 0
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #56 on: 12:46, 22 October 15 »
2 more for me please.

Offline CraigsBar

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.280
  • Country: ie
  • The party ain't over yet
    • index.php?action=treasury
  • Liked: 1171
  • Likes Given: 79
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #57 on: 16:37, 22 October 15 »
When this comes I hope to see USB mouse support. And then support for it in symbos and futureos. And then finally in can sell my symbiface ii and move everything to m4x based expansions.

So happy ;)
IRC:  #Retro4All on Freenode

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1976
  • Likes Given: 4650
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #58 on: 18:02, 22 October 15 »
When this comes I hope to see USB mouse support. And then support for it in symbos and futureos. And then finally in can sell my symbiface ii and move everything to m4x based expansions.

So happy ;)


Green light from my side.  :)  Already implemented a detection of the Albireo even before the hardware does exist. (Bit 1 of the first config byte was unused, now it tells if the USB port is present).  8)  Of course I honestly got no idea about USB programming, so I need some information about it. But a mouse it usually not that hard to implement.  :)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline PulkoMandy

  • 464 Plus
  • *****
  • Posts: 338
  • Country: fr
  • Liked: 269
  • Likes Given: 1
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #59 on: 19:45, 22 October 15 »
You will need the CH375 datasheet for this, it has the command for communicating with a device that is not mass storage. It is a two part document, CH375DS1.pdf and CH375DS2.pdf. I'm not sure if the second part is available in english yet...


USB mouses (and keyboards, gamepads, etc) use the HID protocol above USB. There is a possibly complex setup phase (I'm not sure how much of this the CH376 handles for you), and then you can poll the device for periodic reports (usually at 125Hz but this is configurable). You get a report with the mouse buttons state, and dx/dy since the previous polling.

Offline Bryce

  • The Hardware Guy.
  • Supporter
  • 6128 Plus
  • *
  • Posts: 11.048
  • Country: wf
  • It's not broken, it just hasn't been fixed yet.
    • index.php?action=treasury
  • Liked: 3918
  • Likes Given: 408
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #60 on: 22:00, 22 October 15 »
The easiest way to host a USB mouse is to force it back into PS/2 mode, this is what my AMX Mouse adapter does. It has the disadvantage that fancy multi-speed 16 button gaming mice won't be supported, but 3 buttons and a scroll wheel are enough to support anything the CPC ever knew and a bit more.

Bryce.

Offline PulkoMandy

  • 464 Plus
  • *****
  • Posts: 338
  • Country: fr
  • Liked: 269
  • Likes Given: 1
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #61 on: 22:22, 22 October 15 »
This won't work here, the controller chip doesn't talk any PS/2. So yes, USB is more complex, but the hardware handles at least some of it, and it is only an extra functionality on this already feature packed board.

I ordered a first batch of components, so I can check on paper that everything fits the board as expected. I also double checked that the SD socket I used is hand solderable (it is!). Note that this socket is a bit unusual, it is not the type where you slide the card in, instead it opens and closes to lock the card in. This makes the pins under it a lot easier to reach. I hope no one has problems with that :)


I also made some last cleanups and changes to the PCB
  • The SD card socket has a "restricted area" below it. I removed any tracks that were crossing this to be extra safe
  • I modified the wiring of the "remote control" system to a different bit to be more logical
  • I wired the CURSOR signal from the expansion port (from the CRTC) so it can be used as a cheap "timer" interrupt (it can trigger when the CRTC scan reaches a particular position on screen).
« Last Edit: 23:58, 22 October 15 by PulkoMandy »

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1976
  • Likes Given: 4650
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #62 on: 19:39, 23 October 15 »
Hi, sorry for derailing a bit... can you tell more about the CURSOR signal? Is is a constant signal like 1 MHz or is it more complex?

TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline Grim

  • CPC6128
  • ****
  • Posts: 202
  • Country: gp
  • La pak ba, bèf ka pasé
    • THERE IS NO GAME
  • Liked: 133
  • Likes Given: 67
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #63 on: 19:57, 23 October 15 »
I wired the CURSOR signal from the expansion port (from the CRTC) so it can be used as a cheap "timer" interrupt (it can trigger when the CRTC scan reaches a particular position on screen).
Won't that cause any problem with the PlayCity? Can it be made optional?

Offline PulkoMandy

  • 464 Plus
  • *****
  • Posts: 338
  • Country: fr
  • Liked: 269
  • Likes Given: 1
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #64 on: 22:50, 23 October 15 »
Hi, sorry for derailing a bit... can you tell more about the CURSOR signal? Is is a constant signal like 1 MHz or is it more complex?


The CURSOR signal comes from the CRTC. It is meant to be used to draw a cursor on screen, but for some reason, people at Amstrad did not use it and instead decided to put it on the expansion port.


The signal triggers when the CRTC reaches a particular character and line, and it can also be made to blink (on for 16 frames, off for 16 frames). So, by setting the cursor at some position on screen, you can get a kind of "raster interrupt" that triggers when the CRTC reaches that line.


This is available on the PlayCity as well. On my board, the signal is wired to the serial controller which handles all the interruts. There is a mask to enable or disable all of them, and route them to either NMI or normal INT. I think this is enough to avoid interferences? (interrupts are disabled by default, if I did things right).

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1976
  • Likes Given: 4650
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #65 on: 22:58, 23 October 15 »
The signal triggers when the CRTC reaches a particular character and line, and it can also be made to blink (on for 16 frames, off for 16 frames). So, by setting the cursor at some position on screen, you can get a kind of "raster interrupt" that triggers when the CRTC reaches that line.


Ah! Thanks! So I set the (invisible) CURSOR to one screen address, and if the beam reaches that spot, then the CURSOR pin provides a signal. This is once per FRAME I assume, right?

TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline PulkoMandy

  • 464 Plus
  • *****
  • Posts: 338
  • Country: fr
  • Liked: 269
  • Likes Given: 1
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #66 on: 23:25, 23 October 15 »
Yes, that's it.


The cursor is usually a block, so it could trigger several times (on 8 consecutive lines of a character for example, so one interrupt every line). But you can configure the cursor to be one single line as well.


The cursor is configured using registers 14 and 15 (character address, these work like R12 and R13) and R10 and R11 (line in the character). Some details here: http://www.6502.org/users/andre/hwinfo/crtc/crtc.html

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1976
  • Likes Given: 4650
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #67 on: 23:57, 23 October 15 »

Thank you for your great explanation!  :) :) :)

My idea is at the side to have some FDC routines controlled by a 25 us NMI, so by "just" using the 2nd register set one could do a lot while loading data. However this may not be really easy, because the timing is really tight. My actual floppy routine need about 16 us per byte (iirc) by using an IN L,(C):JP (HL) construction. Now NMI handling is a few us in addition... we'll see.  :)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline Fessor

  • CPC6128
  • ****
  • Posts: 198
  • Country: de
  • Liked: 162
  • Likes Given: 40
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #68 on: 23:59, 23 October 15 »
 :o Huh... The Missing Link for configurable Rasterline-Interrupt?

Offline TotO

  • 6128 Plus
  • ******
  • Posts: 3.456
  • Country: fr
    • ?area=showdonations;u=4
  • Liked: 2630
  • Likes Given: 1558
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #69 on: 00:11, 24 October 15 »
Won't that cause any problem with the PlayCity?
Yes, it will cause conflicts with the PlayCity and should damage the CTC timer and trigger 1 by using CURSOR and NMI.
By the way, I don't understand why an USB board have to use those signals to properly work. Should conflict with the GA too.
« Last Edit: 20:39, 24 October 15 by TotO »
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

Offline PulkoMandy

  • 464 Plus
  • *****
  • Posts: 338
  • Country: fr
  • Liked: 269
  • Likes Given: 1
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #70 on: 00:41, 24 October 15 »
You do not need to use any of this for just the USB part, of course. I'm just including these as extra features because I had some pins left to handle them, and I don't like unused pins much.


I dont understand what I could damage? I'm triggering interrupts with an open collector driver, just as the internal logic in the CPC. If the PlayCity doesn't handle that, how does it works? Are there schematics for it somewhere? As for the cursor signal, I'm only using it as an input, and I see no way this could damage anything. The only risk I see is triggering multiple interrupts at the same time, which is not really a problem and easily avoided if you program each device properly.


I know that the interrupts can conflict with the gate array, there are ways around that - either reset the GA counter often enough, or disable the INT and use NMI. I don't plan to use vectored interrupts. It is possible to check Albireo's status register, and if there are no flags set there, it means the interrupt came from the gate array or some other extension.


I'm out of dipswitches for hardware disabling of the cursor signal, but I can include a small solder link so it can be (relatively) easily disconnected.


I have started writing the developer documentation while I wait for the chips to be delivered. It is only an early draft now, but here you go: Shinra Team

Offline PulkoMandy

  • 464 Plus
  • *****
  • Posts: 338
  • Country: fr
  • Liked: 269
  • Likes Given: 1
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #71 on: 15:35, 24 October 15 »
Update of the developer guide, to explain the general design and feature set of the board, as well as the interrupt management: Shinra Team

Offline Munchausen

  • 6128 Plus
  • ******
  • Posts: 774
  • Country: gb
  • Liked: 211
  • Likes Given: 215
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #72 on: 15:45, 24 October 15 »
Hey PulkoMandy, great board! I'd like to preorder 2 please! (hmm, still got to get a C4CPC)

Offline PulkoMandy

  • 464 Plus
  • *****
  • Posts: 338
  • Country: fr
  • Liked: 269
  • Likes Given: 1
Re: Albireo - USB/SD/Serial interface for CPC
« Reply #73 on: 16:32, 24 October 15 »
Current waiting list
0 - PulkoMandy
1 - OffseT
2 - TFM (x2)
4 - ||C||-||E||
5 - majikeyric (x2)
7 - CraigsBar (x2)
9 - pelrun
10 - Optimus
11 - AsT
12 - Gryzor
13 - hsimpson
14 - SOS
15 - tonio8bits (x2)
17 - Audronic
18 - gros_minet
19 - Fessor
20 - Sykobee (Briggsy)
21 - skywalky
22 - Jungsi
23 - Poliander
24 - Yannis_uno
25 - Rennert
26 - HAL6128
27 - Joseman
28 - Tai
29 - Grim
30 - reidrac
31 - cosa_nostra_6128
32 - Targhan
33 - oratyper
34 - NiNxPe
35 - Vandalsk (x2)
37 - Dirtybb
38 - Dubliner
39 - ronaldo (x2)
41 - cpcmaniaco (x2)
43 - Munchausen (x2)
45 -


The first batch will be of 5 boards, if all goes well the next batch will be 50 boards (and a lot of work for me to assemble them). We'll see then if there are enough orders for a 3rd batch.

Offline jrodriguezv

  • CPC664
  • ***
  • Posts: 53
  • Country: es
  • Liked: 15
  • Likes Given: 19
Albireo - USB/SD/Serial interface for CPC
« Reply #74 on: 20:40, 24 October 15 »
Hi! I would like to preorder two boards, please :-)
« Last Edit: 20:42, 24 October 15 by jrodriguezv »