6 ms·
The Cody Computer
- ddingus 2y agoI like this project! The PCB looks clean, and has a lean, but complete set of components. 160x200 video is a mistake however. Those pixels are twice as wide as they are tall, in NTSC signaling to be perfectly fair. And to be a bit more fair, using that resolution can mean eliminating color "dot crawl" common to devices outputting a composite color video signal, which this little computer appears to do. Now I have written quite a bit of video related code for the Propeller 1 chip featured in this project. It is possible to compromise and double the video resolution to 320x200 and still maintain that crisp look seen in the product photos. The secret is to avoid the color signal interlacing, and or output s-video, which is separated Luma and chroma signals similar to the C64 output signal. Additionally, one can get these little S-video to composite adapters that work pretty well on a non s-video capable display, though the Propeller can offer either video signal just for the asking, and the same video circuit is used for both. With NTSC, anything over 160 pixels in the active video area, which is the signal inside the borders seen in the product photos on the project page, tends to leave fringing between high contrast pixels. Contrast being say, red and blue, which are far apart on the color wheel. This is caused by the low resolution of the NTSC color signal itself being superimposed onto the monochrome Luma signal in the composite, single RCA jack output case. What I did for my video drivers, which can be found on the Parallax site with usually an MIT license, was to simply not interlace the color signal. The spec calls for the color timing to be such that every other scan line is out of phase relative to the prior scan line. This allows for 320 pixel color resolution with the cost being the fringing at high contrast pixel transitions. If the driver simply does not do that, the result is a bit less sharp color, but also no shimmering in the text. That works pretty well with composite on most displays. And when S-video is used, doing the interlace simply improves on the non interlaced color, making it sharper. A propeller chip video generation is almost entirely software driven, which means one can do just about anything with the output signal. It is really a fun device. In my opinion, a 40x25 text display with 7 bits per character, rather than the 4 bits seen on the CODY, would be a whole lot easier to read. The good news is anyone can do that due to how the Propeller is a software driven video device. All that said, the project author may have intended a specific look and feel, and if that is the case, the project looks like a home run!
- ddingus 2y agoI meant 8 bits per character above, but passed my edit window. Ah well.
- fjmilens3 2y agoI'm the person behind the project (and I have a funny feeling I used your 8x8 text driver back when I was trying to learn how the Propeller worked). Anyway, there were actually a few reasons behind the 160x200 video mode: One was simplicity for the user. When this was all just an idea, I often compared it to a "Commodore Junior" in terms of functionality, and I wanted to keep it simple to learn from and have fun with. I thought something like the C64 or Plus/4's multicolor graphics mode would be the best compromise in terms of letting you make graphics/games but also having readable text output. A lot of old C64 games did just fine with 4x8 multicolor text, and even the VIC-20 did passably well with some of the 40-column extensions people wrote for it. Another was simplicity from the standpoint of designing the thing. I actually looked into trying to mimic most of the VIC-II's functionality, including being able to mix low-res and high-res on the same line. I just couldn't convince myself there would be enough cycles to pull that off, or at least I'm not sharp enough to manage the feat, particularly with sprites also involved. You could do it with more cogs (Propeller cores) but since the Propeller is handling so many jobs (kind of like the TED on the Plus/4 series), there were constraints there as well. From there I went back to thinking about separate high-res and low-res modes, but that circles back to the above point about complexity. Yet another reason was that Cody actually liked the multicolor graphics modes (and I do realize how that sounds). When I played around with different video graphics he got really big eyes and a smile watching multicolor tests on the TV. He also really enjoyed YouTube videos of Commodore Plus/4 games done in the multicolor mode it had when I was reading up on the TED. If it got his attention I found a way to work it in, and I also think a really smart Pomeranian isn't necessarily that much different from a really young boy in terms of researching your audience for this kind of thing. (True story: At one point when I was showing Cody the Propeller breadboard I used for experimenting, he started slapping the RCA jack with his paw with a curious look like it was going to do something. I think he saw me plug that into the cable so many times that he concluded the RCA jack is what made it run or something.)
- ipython 2y agoThis would be an awesome build your own 8bit computer project - I would buy it to do together with my kids. Super cool
- james_marks 2y agoIs there a rough estimate what the BOM costs? Looks like a fun learning project.
- pryelluw 2y agoYes, interested as well. If this can be built for less than $100 then I’m in.
- LeFantome 2y agoThe two most expensive parts are probably the CPU ($14) and the Propeller 1 ($12). If you have a 3D printer, the entire project is probably well under $100.
- gary_0 2y agoThe keyboard might add quite a bit to the cost, I'm seeing around $25 minimum for a set of MX compatible switches.
- shreddit 2y agoIt shouldn't be too hard to replace the "custom" keyboard with a ps2 keyboard and do the ps2 driver on the propeller
- fjmilens3 2y ago> It shouldn't be too hard to replace the "custom" keyboard with a ps2 keyboard and do the ps2 driver on the propeller You might be surprised at the knock-on effects of that. You're not going to be able to drop in the PS/2 driver from the OBEX that easily. The Propeller has 8 cogs. Right now one manages the 6502 bus, one manages the SID emulation, one manages the NTSC video generation, four are in use for scanline rendering, and one is used to implement two separate UARTs via coroutines. So you have no free cogs, so unless you can wedge your own PS/2 driver into the UART or SID code somehow, you have nowhere for it to run. Also, the Cody Computer has its own ROM in 65C02 assembly, and that has its own I/O routines written around the idea that it's scanning the keyboard using the 65C22 VIA. You could change some of the ROM so that it would read the PS/2 input from the Propeller (assuming you could solve the above problem), and most of the programs in Cody BASIC would work as long as you consistently translate the data. However, assembly language programs that directly scan the keyboard matrix would be completely incompatible. The joystick ports are also scanned as part of the keyboard matrix, so you'd have to keep that separate, ditch the joysticks, or something else. That means that you don't really have the option of deleting that much code, which poses another problem because the Cody Computer's (emulated) 8-kilobyte ROM is already full from the BASIC interpreter, runtime routines, and default character set. You can also move that around and expand the boundary, but again, that introduces yet more changes so it would be harder for people to share programs, particularly low-level ones. It also reduces the sense of it really being a retro 8-bit computer. If the Cherry MX switches are too expensive, you've got better options: 1. Buy some knockoff switches off Amazon, Alibaba, or whatever; I'm seeing 32-packs of Cherry clones for $10 to $15, tops. 2. Get a piece of junk mechanical keyboard that's really only good for scrap and try to desolder and salvage 32 of the switches. 3. Redesign the KiCad file for the keyboard to take tact switches. That said, if you're going to buy a board, an additional $10 or so for switches isn't that bad. (The very first keyboard we did actually had more keys, but all of them were tact switches; it was a neat keyboard but it wasn't a joy to type on.)
- pryelluw 2y agoI didn’t know the propeller was still for sale. I remember learning spin years ago to play with one of the older propeller chips. This is a good surprise and seems like a fun project to do. For some reason I keep wanting to go into retro computing but never seem to have the time …
- ddingus 2y agoParallax will continue to offer both the original Propeller and the second generation chip, known as P2 or Propeller 2 basically as long as they remain in business. The idea was to offer more capabilities to existing Propeller users as much as it was attracting new users for whom the first chipboard not make sense. The newer design being named a "2" can be confusing! They are similar, yet very different devices. This project uses the original, which in my opinion, was the perfect choice.
- ddingus 2y agoThe Propeller is a good bridge into retro in my view. The device offers great retro level video just about any way you want it, except digital. VGA, NTSC, PAL, s-video, others... You can drive TTL displays, such as a CGA, EGA, Monochrome. And on composite, you can crank horizontal resolution way up to do, 80bcolumn plus text. People have made various Basic dialects, there is a quite capable Forth, and of course SPIN is fun and easy. Feels retro to me. One has to go looking, but there are a lot of games too.
- fjmilens3 2y agoI would actually go so far as to say the Propeller is a good bridge into general electronics, certainly anything digital. It comes up in the context of video generation, but it can do so much more than that because of the multicore design; instead of built-in peripherals you can use a core to implement more or less what you need, certainly within an educational context where you're not as focused on peak throughput for an SPI device or something. The problem is that the Propeller community ended up being a lot smaller than, say, the Arduino community, so learning materials aren't nearly as available outside of Parallax's publications or the forums. That said, I think that if you took a group of kids and gave them Propellers compared to a similar group with Arduinos, the Propeller group would understand a lot more about why things work the way they do.
- davidw 2y agoIn terms of the nostalgia factor, I could smell my brand new Commodore 64 when looking at this, so from that point of view it's a win.
- homarp 2y agovery similar in spirit to Olimex Neo6502 https://olimex.wordpress.com/2024/06/25/the-world-fastest-6502-computer-neo6502-open-source-hardware-is-now-is-available-as-all-in-one-pc-with-plastic-box-lcd-display-usb-hub-four-uext-connectors-12-gpio-extension-connector-lipo-batter/ https://olimex.wordpress.com/2024/06/25/the-world-fastest-65... it's a real 6502 assisted by a RP2040 https://github.com/OLIMEX/Neo6502 https://github.com/OLIMEX/Neo6502 docs http://www.neo6502.com/ http://www.neo6502.com/
- fjmilens3 2y agoThat's true. From a technical standpoint a closer example would be Jac Goudsmit's Propeddle project, or its predecessor, the Propeller-6502 hybrid made by Dennis Ferron. There's actually a long tradition of using the Propeller as the equivalent of custom silicon in such projects before people started doing the same with ARM. I think the only thing that really holds the original Propeller back in such projects is that while the Propeller is fast, it's going to take a few cycles to interface the 6502 bus whatever you do. The Propeller runs at 20 MIPS per cog, which can easily bit-bang the bus when the 6502's running at 1 megahertz or so. But if the 6502 is running at 16 megahertz then it's not going to be able to keep up without some external decoding logic and throwing in a wait state via the 6502 RDY pin. The newer Propeller 2 would have no such constraints, but it's also a more complex chip that you can't get in a 40-pin DIP.
- rbanffy 2y ago> you can't get in a 40-pin DIP. A small board could sacrifice some IO pins and still get it to 40 pins. Or, at least, 64 like a 68000.
- sourcepluck 2y agoWow, that's so very cool! Olimex are wonderful!
- freitasm 2y agoLove the chapter dedicated to Cody, in the manual.
- fjmilens3 2y agoThank you. :-)
- shreddit 2y agoIt shouldn’t be too hard to use a ps2 keyboard with the propeller, or am I missing something?
- JohnMakin 2y agoa driver?
- fjmilens3 2y agoThe Cody Computer doesn't use a PS/2 keyboard, it's actually using the 65C22 VIA and a CD4051 to scan the keyboard matrix. This is mentioned in the book and in the schematic up on Github, but for a quick version, it's conceptually very similar to the Oric (as mentioned on Garth Wilson's site: https://wilsonminesco.com/6502primer/potpourri.html https://wilsonminesco.com/6502primer/potpourri.html). But for the Propeller itself, there's actually a driver for PS/2 keyboards and mice written by Kwabena Agyeman. It's up on the OBEX (https://obex.parallax.com/obex/combo-ps2-keyboard-and-mouse-driver/ https://obex.parallax.com/obex/combo-ps2-keyboard-and-mouse-...) which is a good place to look for Propeller-related code. I've never used that driver personally, but that's where I would start.
- ok123456 2y agoNot to be confused with Colby the Computer.