News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_PulkoMandy

Albireo - USB/SD/Serial interface for CPC

Started by PulkoMandy, 15:54, 18 October 15

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

dirtybb


Dubliner


Vandalsk

Quote from: TFM on 21:50, 20 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

TFM

#53
What I found on a quick search...


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

PulkoMandy

#54

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.

TFM

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

Cpcmaniaco


CraigsBar

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

TFM

Quote from: CraigsBar on 14: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 ;)


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

PulkoMandy

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.

Bryce

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.

PulkoMandy

#61
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).

TFM

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

Grim

Quote from: PulkoMandy on 20:22, 22 October 15I 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?

PulkoMandy

Quote from: TFM on 17: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?


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).

TFM

Quote from: PulkoMandy on 20:50, 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

PulkoMandy

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

TFM


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

Fessor

 :o Huh... The Missing Link for configurable Rasterline-Interrupt?

TotO

#69
Quote from: Grim on 17:57, 23 October 15Won'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.
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

PulkoMandy

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

PulkoMandy

Update of the developer guide, to explain the general design and feature set of the board, as well as the interrupt management: Shinra Team

Munchausen

Hey PulkoMandy, great board! I'd like to preorder 2 please! (hmm, still got to get a C4CPC)

PulkoMandy

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.

jrodriguezv

#74
Hi! I would like to preorder two boards, please :-)

Powered by SMFPacks Menu Editor Mod