Forum Update - Announcement about May 10th, 2018 update and your password.

Now Available: WordFire Quad-Screen Word Game Console and Clock

13

Comments

  • @David: For those ten units, only two have screens and driver boards. But the PCB's in all of them are populated and tested (except for audio chips). For that batch of 10, the soldering went well; I only had a couple shorts to resolve (none would be better, but my eyes aren't what they used to be even while working under a lighted magnifier). In addition to screens and driver boards, I need to source keyboards. I just finished going through 100 pages of keyboard listings with about 40 items per page to see what's available. Of course, the vast majority are not suitable for my project (due to price, size, style, connectivity, etc.). Fortunately, I came up with a few candidates. Again, suppliers come and go, so I was somewhat concerned about availability. It's actually easier to source the screens than the keyboards.
  • Sounds like a big job! Your project has motivated me to try making my own PCB. It wouldn't be for a game platform like yours. That's way beyond my ability. I will probably start with a simple PCB to drive WS2812 LEDs.
  • Working on a project is definitely a good way to learn, probably the best way.
  • JRetSapDoog, Awesome project and product!! Very well done, great videos, overwhelmingly detailed explanations and I salute your passion for your design. Watching the videos on the word games grabbed my interest in your product, so I may be a future buyer.

    On the topic of other game options, I would think that a version of Battleship would be possible?? Maybe even a 4 way version? Other ideas are Snake, Minesweeper, Colossal Cave Adventure, and something along the lines of a Choose Your Own Adventure book.
  • JRetSapDoog, Awesome project and product!! Very well done, great videos, overwhelmingly detailed explanations and I salute your passion for your design. Watching the videos on the word games grabbed my interest in your product, so I may be a future buyer.

    On the topic of other game options, I would think that a version of Battleship would be possible?? Maybe even a 4 way version? Other ideas are Snake, Minesweeper, Colossal Cave Adventure, and something along the lines of a Choose Your Own Adventure book.
    I like the idea of multi-player text adventures and have been thinking about how to do one on this platform. Of course, that presumes that we are able to actually buy this! :smiley:

  • I think a 4 player battleship game is a absolute doable and cool idea.

    There might be other board games able to move to 4 text screens

    Not sure about all those text-adventures, as far as I remember there where not made for multi players, conceptual.

    Card Games may be possible, one TUI engine for cards could be used for different games.

    Enjoy

    Mike
    I am just another Code Monkey.
    A determined coder can write COBOL programs in any language. -- Author unknown.
    Press any key to continue, any other key to quit

    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this post are to be interpreted as described in RFC 2119.
  • msrobots wrote: »
    I think a 4 player battleship game is a absolute doable and cool idea.

    There might be other board games able to move to 4 text screens

    Not sure about all those text-adventures, as far as I remember there where not made for multi players, conceptual.

    Card Games may be possible, one TUI engine for cards could be used for different games.

    Enjoy

    Mike
    There were things called MUDs for a while (multi-user dungeons) that were sort of like text adventures but for multiple players. Of course, those were generally played over a network connection. I'm not sure there would be any real advantage to playing them with four people in the same room.
  • well the advantage is to have 4 people in one room :smile:

    Mike
    I am just another Code Monkey.
    A determined coder can write COBOL programs in any language. -- Author unknown.
    Press any key to continue, any other key to quit

    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this post are to be interpreted as described in RFC 2119.
  • msrobots wrote: »
    well the advantage is to have 4 people in one room :smile:

    Mike
    If that's the only advantage then all four could be playing the game on a phone app coordinated by a cloud server.

  • While a four player version of a text game may not be ideal, what about splitting it to where 2 players are selecting scenarios/decisions/outcomes and the other 2 are "playing", (making the choices)?
  • While a four player version of a text game may not be ideal, what about splitting it to where 2 players are selecting scenarios/decisions/outcomes and the other 2 are "playing", (making the choices)?
    That's a good idea. Or have one "dungeon master" and up to three players.

  • @WBA Consulting: Thanks, WBA. That means a lot coming from you, someone who knows what it takes to make something. I appreciate the encouragement. Thanks for taking a look at the videos and for the game ideas. --Jim
  • What about using an inexpensive MCU that can do USB to interface the keyboards so you don't have to locate PS2 compatible ones? You could even connect it to the EEPROM pins and have it simulate the boot EEPROM so you don't have to add to the chip count. Then the keyboards could appear as I2C devices after boot. That would free up pins to support more colors as well.
  • jmgjmg Posts: 11,656
    David Betz wrote: »
    What about using an inexpensive MCU that can do USB to interface the keyboards so you don't have to locate PS2 compatible ones? You could even connect it to the EEPROM pins and have it simulate the boot EEPROM so you don't have to add to the chip count. Then the keyboards could appear as I2C devices after boot. That would free up pins to support more colors as well.

    Interesting idea - I did see a CH554 MCU that claims to do USB Host, for Jiangsu Qin Heng CH554G Package: SOP-16_150mil 100+ $ 0.4492
    ( Not sure how easy that is to code, from Chinese data .... ? )
  • JRetSapDoogJRetSapDoog Posts: 570
    edited June 12 Vote Up0Vote Down
    @Dave: That's worth considering, but it sounds like it's over my head and would require learning another architecture. Do you have a specific chip in mind or are you just assuming that there must be something available (and that it could handle multiple keyboards, though I think the HID protocol can handle up to seven)? The one chip that jmg mentiond is Greek, er, Chinese to me, and who knows how long it'll be around (though it looks to be 8051-based).

    I do wonder if they've licensed it properly. I also wonder if using such a USB chip and USB keyboards would require me to license USB (become a member or whatever other stupid and expensive hoops one has to jump through for something so mundane). Heck, I even wonder that about the USB sockets I'm using. Anyway, I don't advertise this as being USB compatible and it's not, so I'm not too concerned about it. And even if the system were USB compatible, I could forego using the USB logo. There really ought to be a waiver for use of default or de facto standards for small entities anyway, in my opinion.

    Also, this chip suggestion makes me recall that I used to have a second Propeller in some of the prototypes, and in a couple of them, the second Prop just handled the keyboards. Back then, I wasn't sharing the vsync and hsync signals, so this didn't allow for extra colors. But I can see how it could free up six (possibly seven) pins. Assuming just six pins, that would allow adding an additional bit, say, for the green channel, and two free pins for whatever. But I don't really think that's much of an advantage color-wise over what I've already got...as what I've got already allows for text-based games with a lot of color combinations.

    Regarding PS/2-compatible keyboards, they're not so hard to find; it's just that it's difficult to confirm with vendors as to whether their offerings are compatible or not (I wish I could deal directly with the manufacturers, but at my small quantities...). So far, I've been pretty lucky guessing compatibility based on just appearance/style, cost and country-of-origin which ones have a good chance of being PS/2 compatible (quite a few of them are) And I'm glad that the keyboards I buy are all USB compatible, that way they can be repurposed if desired. Of course, it'd be nice if my main board could work with USB-only keyboards, but it doesn't.

    But assuming P2/2 keyboards will be used, which in all likelihood they will, I'm sort of surprised that someone has suggested a way of connecting them up with some kind of hopefully expensive interface controller to save pins on the main Prop, again to add colors or other functionality. I haven't looked into that but it might be possible. However, it would require an overhaul of the keyboard driver. Anyway, a second Prop can handle that easily, for about $8 of cost over what another chip (or microcontroller) would add (though likely with a bigger footprint considering the crystal and eeprom the Prop uses). Anyway, thanks for the ideas, guys, and the related discussion.

    By the way, I pulled the trigger on a VGA driver board order today, so I'm slowly making headway to build out some consoles for sale. However, there are still other parts to order. For example, I hope to order some 4-pin PH2.0 cables because I've been sacrificing my 12-pin cables to make 4-pin cables, but doing so is time consuming and not as pretty. Anyway, if all goes well, new driver boards should be on the way soon. It's been some time since I've ordered parts from China, and It took me a while to arrange the payment stuff (I had someone help me). But I'll probably wait until I see confirmation of shipment before I order again (even though I'll be using a different vendor).
  • Peter JakackiPeter Jakacki Posts: 7,455
    edited June 12 Vote Up0Vote Down
    BTW, I started to look at using Logitech wireless keyboards and mice because they essentially use an nRF24L01 for communication so it should be possible to use a cheap nRF24L01 chip or module and hey presto, instant interface, and no need to worry about USB. I say "should be possible" as I started to play with the chip a while ago sniffing packets in promiscuous mode as an experiment in Tachyon. I will let you know how that goes but it certainly is a much better way to interface to hids rather than going the old PS/2 route which btw if I was contemplating I would still use USB connectors with a PS/2 protocol and just use those devices that supported both but without the dumb and bulky and passive "USB to PS/2" adapter.

    Tachyon Forth - compact, fast, forthwright and interactive
    useforthlogo-s.png
    --->CLICK THE LOGO for more links<---
    Latest binary V5.4 includes EASYFILE +++++ Tachyon Forth News Blog
    P2 SHORTFORM DATASHEET +++++ TAQOZ documentation
    Brisbane, Australia
  • Good to hear you're making progress. You're right that my suggestion was only a half-baked idea. I don't know of specific parts and I don't know if a single part can handle multiple keyboards without some sort of (possibly external) hub. I didn't think about that until after I posted my message. You can just take this as the ravings of a lunatic and keep on your current path! :smile:
  • JRetSapDoogJRetSapDoog Posts: 570
    edited June 12 Vote Up0Vote Down
    @Peter. Great info! Thanks. Regarding, "..., and no need to worry about USB," does that imply that the nRF24L01 can output some kind of serial (non-USB) data, or did you mean in combination with something that already understands USB? Hopefully, you mean the former, otherwise, one would still be dealing with the USB protocol in some form. But if you are able to intercept keyboard scan codes or characters without a full implementation by sniffing, maybe the latter is vastly simplified.

    I recall reading scanlime's thread on the forums here about doing a simplified low-speed HID USB interface on the Prop. On top of that, she had a simplified Bluetooth stack. I think it all took around three cogs (or maybe four). Very nice work. But in the case of the current game console design with only one Prop, I regret that I have only one cog to give for my country of four keyboards (or maybe two cogs at the most), with apologies to Nathan Hale. But your way (with the nRF24L01) would allow for wireless keyboards without the Bluetooth stack (and, again, possible additional licensing woes). That could be an attractive solution.

    I suppose such a solution (particularly if not using a pre-certified module with the regulatory agencies) would increase the need for certification, but it appears that's unavoidable anyway for anything sold in volume or that's not experimental (and maybe even in that case).

    About PS/2-compatible keyboards, I use ones that have USB plugs on them, and they plug into USB type A sockets on the main board, so there's no ugly, "dumb" PS/2 adapter thingy (and no P2/2 connectors on the main board). The keyboards I buy are sold as USB keyboards and don't include a PS/2 adapter, but they can detect a PS/2 connection and switch over if it's detected. I supply +5V. Of course, the differential signaling pair is used for old-style serial rather than USB. I don't know if there's any risk of damage to USB-only keyboards being plugged into the USB sockets on the console's main board. I've done that a couple times and it seems not, but I'm not sure (it may depend on the keyboard). I do use inline current-limiting resistors (and pull-ups) for what it's worth. Anyway, I'm supplying USB keyboards with the system that are PS/2 compatible, so there shouldn't be any problem plugging them in, as they're designed to handle either the USB or PS/2 protocol.
  • JRetSapDoogJRetSapDoog Posts: 570
    edited June 12 Vote Up0Vote Down
    @Dave: If you're a lunatic (raving or otherwise), I'm a total imbecile crossed with a lunatic, as this is a rather crazy project to choose as one's first project. Yeah, I'm keeping on my current path. Hmm, that's sounds like good advice for an electron. What did one electron say to another one that asked for advice while they were meandering down a PCB trace? It said, "If I were you--and for all intents and purposes I am since we have the same potential--I'd keep on my current path." Hmm, I could do a pun with the word "advice," too, but I'll spare you. Come to think of it, I did write up a couple thousand puns once as a prelude to a possible game for the console. I haven't thought about further developing it as there's enough groaning in the world as it is. Edit: Now that I think about it, they were puns disguised as newspaper headlines. I've noticed that clever headlines use a lot of puns. You know, like "Dairy Farmers ____ Their Cows for All Their Worth." I just made that up on the spot, for better or worse, as an example. I'll leave it to the gentle reader to fill in the blank.
  • @Peter: Just did a brief search on nRF24L01 modules. They seem readily abundant (even if Nordic has newer offerings than the nRF24L01 for new designs). And the prices are quite attractive. Looks like the modules use SPI for communication, something the Prop can easily handle. And a video I watched mentioned that up to 125 channels can be created, but I don't know if that means that one module could be used with multiple keyboards or not. I haven't investigated things to see how things might "pair," to borrow a word from Bluetooth. Wonder if each device has a static, unique identifier. I guess the keyboards would have to have an identifier, but if it's not unique, that could be a problem. Offhand, I suppose pairing would all be done in higher level software on the Prop. Wonder if that means a module would listen to and report everything out there (unless instructed not to).

    Anyway, a potential problem in my case might be difficulty in being able to source cheap nRF24L01-based keyboards, and hopefully ones that aren't so big. That's important for the game console system because it potentially uses four keyboards. The keyboards I source are not the cheapest-of-the-cheap (because the cheapest keyboards tend to be BIG and ugly), but they're towards the bottom in price. Of course, it's easy to speculate that, someday, such wireless keyboards could be cheaper than wired ones, because the USB cables cost something and may be hand-soldered in place. Cables make keyboards bulkier and are a potential source of failure due to repeatedly needing to insert/pull plus and cable strain and the cable itself. But right now, wireless keyboards tend to start around 50% higher in price than the wired ones I buy. Now nRF24L01-based ones potentially could be a bit cheaper due to not needing to license USB or BT, but they probably won't be due to lower volumes. And stuff from Logitech is not really at the low end in price (though not unreasonably priced, either)

    Anyway, I love the suggestion of considering such wireless technology, Peter. And I'd love to hear about any progress you make or obstacles you encounter on that front. Frankly, your work around the Prop is amazing. You really seem to have your hands full, but still manage to crank out stuff. What you've been doing on the P2 forum is incredible. And not being content to squeeze Tachyon into the ROM, you're tackling documentation, logos, and board designs (and who knows what else). I can only watch you in slow motion.

    BTW, originally, I wanted to use wireless keyboards for the game console. But I wasn't able to find any good BT solutions that worked well with the Propeller. I knew that there were a lot of modules out there, but many didn't support HID, and even if they did, I don't know if they would work as hosts, if that's the right word. But back before I looked into BT, I tried making my own wireless keyboards by hacking existing USB keyboards with infrared circuitry. I started with a Princeton Technology remote control chip (I believe it was) and got that working. But it was a bit too slow for touch typing. For example, when quickly typing the word "the," the 'h' would often get missed.

    So then I pursued using a Microchip microcontroller to do the job (as I think it could do the job fast enough and could buffer keystrokes as necessary), but I ran out of steam. I knew that my desire for wireless keyboards was distracting me from finishing the game console design and writing games for it. I also reluctantly admitted that it would take too much time and cost too much to modify keyboards. So I wisely (I think) abandoned the effort, though not after investing some time and effort into it. Plus, I knew I was going to have to figure out a way to get the IR keyboards to work at close range in such a way that the four of them at 90 degree angles didn't interfere with each other (no small task considering how IR signals can bounce around). I was hopeful that a small, deep hole in the housing and sharp attenuation at the transmitter would do the trick (or possibly the use of different carrier frequencies, and I also briefly experimented with direct transmission (no carrier)). But I never pursued those ideas far enough to know if they could work.

    But the real impetus for using wired keyboards and just accepting the cables was the cheap prices that such keyboards can be had for if one shops around. To have any chance of making the game console a reality, I needed to be able to source components (especially, screens, driver boards and keyboards) cheaply. And it seems that nothing can really compete at present and likely in the near-term with the wired USB (PS/2 compatible) keyboards. Having said all that, I'll keep my eyes open for nRF24L01-based keyboards and so on...'cause you never know. Thanks again for the information. And good luck getting the nRF24L01 working in Tachyon, not that it's critical to the success of Tachyon. And congrats on bring Tachyon so far along and getting a version of it into the P2 boot ROM. Again, AMAZING!
  • jmgjmg Posts: 11,656
    ... I supply +5V. Of course, the differential signaling pair is used for old-style serial rather than USB. I don't know if there's any risk of damage to USB-only keyboards being plugged into the USB sockets on the console's main board. I've done that a couple times and it seems not, but I'm not sure (it may depend on the keyboard). I do use inline current-limiting resistors (and pull-ups) for what it's worth. Anyway, I'm supplying USB keyboards with the system that are PS/2 compatible, so there shouldn't be any problem plugging them in, as they're designed to handle either the USB or PS/2 protocol.

    Provided you do not drive 5V into the USB pins, you should be fine (unlikely with a Prop host).
    Does your code detect a keyboard plugged in, and give a message if PS/2 fails ?

    The PS/2 ones will use a MCU that auto-detects - I think Microchip make one, so those should be available for as long as the MCU stays cheap.
    ... But right now, wireless keyboards tend to start around 50% higher in price than the wired ones I buy. Now nRF24L01-based ones potentially could be a bit cheaper due to not needing to license USB or BT, but they probably won't be due to lower volumes. .... I tried making my own wireless keyboards by hacking existing USB keyboards with infrared circuitry. I started with a Princeton Technology remote control chip (I believe it was) and got that working. But it was a bit too slow for touch typing. For example, when quickly typing the word "the," the 'h' would often get missed.
    ..
    IR Keyboards sound even more niche than PS/2 ones ?
    For what you are doing, you certainly do not want a sluggish keyboard :)
    You could make the wired connection a feature - find you how fast you can poll a keyboard, and promote that ?

    For specing simple reaction time games, you could even build an electro-mechanical keyboard whacker, and measure the system response time and more importantly, the variations.
  • JRetSapDoogJRetSapDoog Posts: 570
    edited June 13 Vote Up0Vote Down
    @jmg: Thanks for the info. The +5V doesn't get anywhere near the data pins, and like you say, those are driven by the Prop. No, I don't report any keyboard failures. The keyboard LED's flash on being connected, but there are no error messages on screen in case of failure (I suppose that there could be).

    About the keyboard microcontroller, it never occurred to me that a Microchip part might be used (though I experimented with using a MC one for an IR kbd). I did wonder if Holtek chips were being used, as keyboard chips appear to be one of their specialties. Whatever chips are used, they are unpackaged and covered with black goop (COB). I'll bet lots of different keyboards are using the same chip, as so many of them are USB and PS/2 compatible. But if that chip source dries up, that could be a problem. But we could say that about everything, including the Prop. I think things will be fine as long as there is demand. And some places don't allow wireless keyboards.

    About IR keyboards, I wasn't planning on buying them, as I never found anything suitable in size/appearance (I would have liked to have been able to buy them, though). The closest I found were the old WebTV keyboards. Rather than buying, I was modifying keyboards similar to what I use now. But that wasn't a wise way to go, which would have been obvious to most people (guess I had tunnel vision or something). But you're certainly right that IR keyboards are niche products (I'm not sure I'd say that about the PS/2 ones, though, since they are widely available and may be available as long as wired keyboards are available).

    About measuring reaction times, while the keyboard driver is in PASM, the games are written in SPIN, which might be a limiting factor. I suppose I could store the system counter times that keystrokes come in (right now, keystrokes just queue up without times being stored). Anyway, I did consider doing a Whack-a-mole kind of typing game, only one where one "whacks" (types) letters that "pop up" on an image of a keyboard on a screen. Might be fun as a multiplayer game, and might help to teach typing.
  • By way of an update, I've decided to fully build out a small batch of units. Currently, I'm still sourcing parts. It's been going rather slowly. However, I did order and receive driver boards, though I haven't ordered the LCD screens yet.

    I'm in the process of getting keyboards. Last week, I tried to order keyboards that are identical to those shown in the video. However, my old provider no longer offers them, and my attempts to order from a few other vendors fell through. In particular, a couple weren't willing to ship to my location (they said that they only ship within China), and a couple only had the keyboards in black.

    As a result, I decided to switch to another keyboard style. The key layout is the same as before, as well as the size, but there are differences on the underside of the housing. So far, I'm unable to confirm with the vendor whether they are PS/2 compatible. So, I decided to roll the dice and place a small order to find out (I think there's an 80% or higher chance that they will be compatible, but there's no guarantee). For the keyboards I've ordered, the key caps are the same chiclet or chocolate style as before; however, the key caps themselves are blue as opposed to white. White is available, but I wanted to try something different. Unfortunately, the manufacturer slaps its logo in letters and Chinese characters on the spacebar, but I can live with that for now and hope that you can, too (the rest of the keys will be "clean," i.e., without any alternate input symbols cluttering them up, such as Hanyu Pinyin). Anyway, I should find out tomorrow if my payment went through okay, and if everything goes well, perhaps I will get them at the end of this week.

    And I spent a few days last week trying to source shipping boxes and investigating shipping methods. Unfortunately, in order to get the perfectly-sized box, I'd have to order a couple hundred (MOQ = 200). So, I had to compromise and go with a box in a standard size. The main reason this is important is that shippers use volumetric shipping, which takes into account both the volume and weight of a box. Sometimes the volume dominates the weight in terms of the shipping cost. I found some really strong boxes that I like from a shipping company, but they are just a tad too small to ship the console in assembled form, and I'd prefer to ship the console mostly intact if possible. So, I subsequently purchased some boxes (from elsewhere) that are somewhat bigger that should work fairly well. Interestingly, the cardboard of these larger boxes is noticeably weaker than that of the strong ones, even though both box styles use double-wall (AB) construction that is 0.8 mm thick ().5 + 0.3 mm). That's unfortunate, but the upside is that the boxes I bought weigh something like 150 g less than the stronger boxes (the weight of the box (and other shipping materials) adds to the total weight, obviously). So, I'm learning as I go, here.

    Anyway, by playing again and again with the online shipping calculator of the shipper I'll probably use, I was able to see how shipping costs fell into certain ranges for both volume and weight, and how a box of a certain size has a minimum volumetric weight regardless of how light the contents. Unfortunately, they don't provide a table that explicitly shows the volume and weight ranges involved. From this investigation, I figured out that I'd do best to keep my total weight under 4.5 kilograms. And I determined what box dimensions (or volume) I need to stay under so that I don't get kicked up to the next volume range in terms of cost.

    But the online shipping calculator I used was just a reference tool according to the website, not a guarantee of the costs. So, I packed up a box with a console and four keyboards and so on and went to a local post office to check. They have two shipping methods to the USA and elsewhere: two-week air/surface shipping and four-to-five day shipping. The latter is through EMS. It costs around $55 to ship from my location to the continental US, and that's without insurance. So shipping is not cheap. The slower shipping method is about 10% cheaper, but I fear more could go wrong the longer the package is in transit, and I've used EMS in the past for things. Still, I haven't decided which way to go yet. I'd prefer EMS, but want to keep costs down where possible. I haven't checked shipping costs to other countries at this point. As a guess, I'd assume that things might be a slightly cheaper to Australia, but I don't know.

    Based on feedback I've received, I'm hoping to reduce the price to get the total with shipping down closer to $300. Also, for the first batch, I've decided not to offer an unsoldered version, and I'll likely throw in the soldering at no extra cost to stay close to three bills. My apologies to anyone who was looking forward to doing the soldering him- or herself, but I haven't ordered any additional PCB boards at this point and all the ones that I have are already soldered and tested (for better or worse). So, that's where things currently stand. My apologies that it's taking longer to source parts than I anticipated. For anyone interested, I appreciate your patience and I'll try to periodically update the status. --Jim
  • jmgjmg Posts: 11,656
    As a result, I decided to switch to another keyboard style. The key layout is the same as before, as well as the size, but there are differences on the underside of the housing. So far, I'm unable to confirm with the vendor whether they are PS/2 compatible. So, I decided to roll the dice and place a small order to find out (I think there's an 80% or higher chance that they will be compatible, but there's no guarantee).

    If you start hitting PS/2 walls, you might be able to do a Bridge ? - USB-Host to PS/2 look alike ?
    If your Chinese is ok, maybe the CH554 can do this ? - that's the smallest/cheapest USB Host I've seen.
    http://www.electrodragon.com/product/ch552-ch554-mini-dev-board-ch55x-series/ As a PCB module $2.20
    http://www.electrodragon.com/w/WCH#MCU_.2B_USB_CH55x_Series
    https://github.com/Edragon/WCH


  • jmgjmg Posts: 11,656
    edited June 25 Vote Up0Vote Down
    As a result, I decided to switch to another keyboard style. The key layout is the same as before, as well as the size, but there are differences on the underside of the housing. So far, I'm unable to confirm with the vendor whether they are PS/2 compatible. So, I decided to roll the dice and place a small order to find out (I think there's an 80% or higher chance that they will be compatible, but there's no guarantee).

    If you start hitting PS/2 walls, you might be able to do a Bridge ? - USB-Host to PS/2 look alike ?
    If your Chinese is ok, maybe the CH554 can do this ? - that's the smallest USH Host
    http://www.electrodragon.com/w/WCH#MCU_.2B_USB_CH55x_Series
    https://github.com/Edragon/WCH

    Addit : Search of the github above for keyboard, finds this, which looks to manage USB.Kbd <-> CH554.Host -> printf.UART ? (57600?) ( as well as Mouse, HID and printer too... ! )
    Not sure of the difference between 'K' and 'H' keyboard paths in that source code, maybe one is via-hub ?
    Hex file is included, and looks to be 0x2a33 = 10803 Bytes. ( CH554 specs 14k Flash + 2k Bootloader for USB/ISP ), so that's ~ 3k bytes spare, even with the xtras.

    maybe you can find a use for USB-Mouse support too ? ;)


  • JRetSapDoogJRetSapDoog Posts: 570
    edited June 26 Vote Up0Vote Down
    Thanks, jmg. Good information. You certainly are an 8051 evangelist and guru, among many other things. Looks like an interesting chip to fill various niche applications. Now if I were trying to use it, I'd be worried as much over my lack of technical ability/experience as over my poor Chinese, having never touched an 8051 before. However, I suppose that its instruction set and programming aren't really difficult once one gets into it. Coding for it is probably even a lot of fun.

    Under the listed applications, they mention “Simulate HID keyboard or mouse.” Of course, I'd be going the other direction, in that I need to listen to an HID device rather than emulate one. But they also mention “Simulate or handle data for USB device, like 'barcode scan gun,'” which might be comparable to what the console would need to handle USB keyboards (then again, perhaps that's only emulation, too). Anyway, one can create one's own applications.

    Wonder if four such chips would be needed for the game console, one for each of the four USB jacks with connected keyboards. Seems kind of doubtful (or optimistic) that just one of these chips would handle multiple USB devices without any contention, despite what the 'B' in “USB” stands for. Hopefully, I'm wrong, but if not, that would add a lot of pins. It's still an interesting possibility either way, though.

    For such a CH55x solution to be really attractive, it would be great if it would allow for use of those little Bluetooth receivers that plug into USB jacks without needing any Bluetooth stack on the Prop. But I guess such is not the case. However, I suppose the non-Bluetooth 2.4GHz keyboards and dongle sets would work, as has mentioned. But the problem there is that such keyboards are considerably more expensive than what I use, and I don't see a lot of downward movement on the pricing (the price decline seems to have flattened out). Moreover, it seems to me that the long-term availability of the non-Bluetooth wireless keyboards might be in more jeopardy than the wired PS/2 ones (even though the future is wireless in general).

    It's certainly the case that the present game console was designed under the assumption (and hope) that PS/2 compatible keyboards (that auto-adapt to USB & PS/2 signals) will continue to be available. Over the last few years, I haven't deteccted any decrease in availability. That's good, but I don't know why that appears to be the case, as we're a couple decades out from the PS/2 era. I suppose the main factor is “Why not handle PS/2 keyboards since the technology has been developed and the code fits?” And there was likely some aversion to being forced to jump on the USB bandwagon in the earlier days. Anyway, I'm glad that so many keyboards use chips (or a single chip?) that are PS/2 compatible, as the PS/2 technology is simple, reliable and doesn't need any licensing.
  • jmgjmg Posts: 11,656
    ... Now if I were trying to use it, I'd be worried as much over my lack of technical ability/experience as over my poor Chinese, having never touched an 8051 before. However, I suppose that its instruction set and programming aren't really difficult once one gets into it. Coding for it is probably even a lot of fun.
    The core is somewhat incidental, as the tricky part in this sort of device, is starting from working code. Otherwise the SFR's and init stuff is where the pitfalls are, & that's independent of core.
    Under the listed applications, they mention “Simulate HID keyboard or mouse.” Of course, I'd be going the other direction, in that I need to listen to an HID device rather than emulate one. But they also mention “Simulate or handle data for USB device, like 'barcode scan gun,'” which might be comparable to what the console would need to handle USB keyboards (then again, perhaps that's only emulation, too). Anyway, one can create one's own applications.
    Best avoided to try the 'create one's own applications', at least from scratch ;)
    That why under the 'finds this' link I gave above, there is full source code and a hex file, that acts as a USB-Host to a USB keyboard (& others).
    The CH554 claims a USB bootloader, so it should be possible to download that hex, into the $2.20 PCB, and connect the UART to see what happens when you plug in kbd/mouse.
    A few of those boards are on my 'to order to play with' list....
    Wonder if four such chips would be needed for the game console, one for each of the four USB jacks with connected keyboards. Seems kind of doubtful (or optimistic) that just one of these chips would handle multiple USB devices without any contention, despite what the 'B' in “USB” stands for. Hopefully, I'm wrong, but if not, that would add a lot of pins. It's still an interesting possibility either way, though.
    USB needs one Host per cable, so that's either one per USB jack, or maybe a HUB could connect 4x - I've not checked hub prices vs 3 MCUs.
    Anyway, I'm glad that so many keyboards use chips (or a single chip?) that are PS/2 compatible, as the PS/2 technology is simple, reliable and doesn't need any licensing.
    Yes, as long as those are available, and do not start to cost you more, PS/2 is simplest. This suggestion was for if you find those new Keyboards are USB only... & it allows 'my favourite keyboard' type use.
    What do you pay for the latest keyboards ?

  • JRetSapDoogJRetSapDoog Posts: 570
    edited June 26 Vote Up0Vote Down
    @jmg: Thanks for those comments, insights and answers. Yes, I wouldn't want to tackle something like that without an existing code base, so it's nice that one exists. And yes, it would be interesting to see what that board with code installed would do with USB keyboard data. "[O]ne host per cable," you say. I see. Or possibly a HUB would do the trick (David mentioned that possibility, I believe).

    Regarding what I pay for keyboards, as the politician insincerely said during a press meeting, "I'm glad you asked me that...." Ha-ha. I guess it's not any big trade secret, but allow me to just say that it's in the neighborhood of $5 per keyboard with shipping (though that doesn't include the time it takes to deal with vendors, receiving delivery and verifying shipment). Also, from talking with keyboard makers at trade shows, I've learned that some can sell a basic wired (USB) keyboard for as little as $2.50, though that was for keyboards of a different style than what I use, and the MOQ for a price like that would likely be for a quantity of around 3,000 units. Still, that's incredible.

    Someday, perhaps wireless keyboards will be cheaper than wired ones. Pricing on wireless ones has come down over the years, but the aforementioned pricing is still hard to beat (for now, anyway). And the console needs four keyboards (any expensive component that's needed 4x causes the price to balloon). It should be appreciated that acceptance of the game console partly depends on price, and I've received some feedback about the console price being too high as it is. But I think that the average person will have given little thought to how much time (and money) goes into providing something of this nature. Anyway, I'm endeavoring to get the price down without totally cutting my throat (though some neck trauma is expected). And one of the ways of keeping costs down is by keeping things as simple as possible.

    Thanks again, jmg, for pointing out what's already available for the CH55x, as well as the info on how USB works. And good luck with your CH55x module experiments.
  • JRetSapDoogJRetSapDoog Posts: 570
    edited June 30 Vote Up0Vote Down
    Got the keyboards I ordered. Fortunately, they are PS/2 compatible, so they work with the console. Whew! I like them. They seem well made. They are somewhat thicker on the front edge than the other style I've been using, but this makes them stronger and more resistant to flexing when pressing the spacebar in the middle. Other than that, they have the same style of keys and key layout.

    By the way, keyboard companies say that this style of keyboard uses a "public mold," though multiple molds are involved and this one obviously uses a different mold for the back of the housing because it has a semi-circular riser rather than a rectangular one. This rounded riser makes more sense in my opinion because the rectangular riser only contacts a table on its leading edge, leaving the rear edge inexplicably hanging in the air (they should have employed a trapezoidal cross-section, I guess).

    As mentioned above, these keyboards have white housings with blue keys. The keys are sky-blue in color, or pastel blue. While not a dark blue by any means, the pastel keys contrast nicely against the white housing without standing out too much. As for the logo on the spacebar, fortunately, it doesn't really stand out in person. The key labels are white.

    In my growing keyboard collection, I already had a single keyboard that is similar but not identical in style to these new ones. I noticed that typing on these new ones is quieter than that existing one, which is good in my application (since up to four of them are used at the same time). Perhaps they use a different style of keys. I haven't taken one of these new ones apart to see what style of keys is used.

    Some of my past keyboards used the double scissor mechanism for the keys. I'm pretty sure that these keyboards employ a cheaper and simpler plastic mechanism. The scissor style keys seem to rely on a metal plate or framework to embed/support the keys within, making them heavier. These new keyboards are lighter (an advantage for shipping) and probably don't have a metal plate. But typing on them seems fine. Supposedly, the keys are rated for 10M keystrokes. Who knows, that may be exaggerated by a factor of 10 or so, but I think such keyboards will be fine for regular typing, as well as for text gaming.

    I know: that's all more than you needed to know, but I wanted to report something as I progressively source parts for the console. And the keyboards are rather significant for this project. More to come. Yes, a picture is worth a thousand words, so I'll see if I can upload one (not sure if I need to link offsite or what with this version of the forum). Edit: Whoops, I deleted the pic I attached and there's apparently no attachment button when editing a post, so I'll try again in another post with a different pic.
  • JRetSapDoogJRetSapDoog Posts: 570
    edited June 30 Vote Up0Vote Down
    Decided to delete the second pic and replace it with a third with more even lighting and color balance (see next post)
Sign In or Register to comment.