Jump to content
IGNORED

Homebrew ColecoVision replacement mainboard


fieroluke
 Share

Recommended Posts

8 hours ago, fieroluke said:

BIOS for the USB SuperDrive

I am curious about the details on this. I know from my original area of interest (Atari) we have what's called SIO2PC, requiring a client be installed on the PC that mimics a disk drive for the Atari via the SIO interface using a Serial to TTL converter. However the ColecoVision has no existing disk drive interface, so I presume you are adding one to the OS (BIOS), and have decoded an address for the interface to USB.

Link to comment
Share on other sites

2 hours ago, mytek said:

I am curious about the details on this. I know from my original area of interest (Atari) we have what's called SIO2PC, requiring a client be installed on the PC that mimics a disk drive for the Atari via the SIO interface using a Serial to TTL converter. However the ColecoVision has no existing disk drive interface, so I presume you are adding one to the OS (BIOS), and have decoded an address for the interface to USB.

My mainboard has a USB client interface that can connect to a PC, Linux or Mac (or even Android). My mainboard also supports 64K RAM.

The PC/Mac runs a program that provides one of 256 1K sectors, similar to the SuperDrive structure, boot sector is sector 0. That program hosts a file of up to 256K, the “SuperDrive Disk”, so to speak.
 

My custom BIOS replaces the “insert cartridge” code with a bootloader that requests a 1K boot sector from USB, loads it to RAM and executes it. Plenty of space to enable the upper 64K (extended) RAM and load sectors from the “SuperDrive” to RAM.

The ColecoVision has a routine in BIOS that lets the Coleco load one of the 256 1K sectors to any address in RAM, so the 1K bootloader can use that. But the bootloader could also bring its own USB driver and disable BIOS to have a full 64K memory map.

 

I know it’s not exactly compatible with SuperDrive, but it is very similar, and using the standard boot code it’ll be a piece of cake to load non bank switch games of up to 32K to extended (upper) RAM. It should also be possible to port SuperDrive code to this.

 

Edited by fieroluke
  • Like 1
Link to comment
Share on other sites

Wow, sounds very nice 👍

 

I'll have to look up SuperDrive to get a better understanding.

 

Will a game that's been transferred to the CV remain in memory upon powering down (non volatile), or does it need to be loaded again from the PC after power up?

Link to comment
Share on other sites

23 hours ago, mytek said:

Wow, sounds very nice 👍

 

I'll have to look up SuperDrive to get a better understanding.

 

Will a game that's been transferred to the CV remain in memory upon powering down (non volatile), or does it need to be loaded again from the PC after power up?

No, there’s no battery buffer…


As I understand it, the SuperDrive was a tape running endlessly, and if the ADAM wanted to read a 1K block, it would have to wait until that block passed the read/write head, and if you read in sequence the wait times weren’t too bad. The tape would hold 256K in 256 blocks of 1K each.

 

So that’s what I’ll recreate: the CV BIOS routine gets the block number to read, passes it to the PC, which then reads the proper 1024 bytes from the file and sends them back through USB, and the CV BIOS stores the 1K at the destination address. The BIOS increments all pointers so that by calling the routine again the next 1K is read to the next 1K in memory. Hopefully it will be easy to adapt the SuperDrive games to this.
 

But the main benefit would be for developers who want to test on real hardware: just compile the code to a SuperDrive file, the PC exe will always read the latest version of the file, so you just need to press reset on the CV and the CV will automatically boot the new version from USB and execute it.

 

  • Like 1
Link to comment
Share on other sites

3 hours ago, fieroluke said:

As I understand it, the SuperDrive was a tape running endlessly, and if the ADAM wanted to read a 1K block, it would have to wait until that block passed the read/write head, and if you read in sequence the wait times weren’t too bad. The tape would hold 256K in 256 blocks of 1K each.

That's actually very good storage for back in the day --- better then the same era single-sided 5.25 floppy disks.

 

So this must be an ADAM thing. What are you using to recreate the 6801 interface, and how did you amp it into your board? Just curious.

  • Like 1
Link to comment
Share on other sites

6 hours ago, mytek said:

That's actually very good storage for back in the day --- better then the same era single-sided 5.25 floppy disks.

 

So this must be an ADAM thing. What are you using to recreate the 6801 interface, and how did you amp it into your board? Just curious.

I’m using an FTDI-USB-chip mapped to IO via a register. simple and reliable.

  • Like 2
Link to comment
Share on other sites

  • 2 weeks later...
On 10/17/2022 at 2:27 PM, Yurkie said:

So cool that there are 2 super skilled guys, both making their own versions of a new ColecoVision. What a blessing for fans now and in the future.

Actually 3 if the hardware with software emulation combo of the ADAM+ by DVDH is considered. It is obviously a more expensive approach, but a very interesting one to consider especially with the interchangeable Snap Modules.

 

If further additions, enhancements, etc. to the Phoenix are finally made as well as a possible 3rd run, there will be a lot of options for people.

 

With all that said, the suped-up YurkieVision CV and LundyVision ADAM will always be my mainstays.

 

 

  • Like 1
Link to comment
Share on other sites

5 hours ago, NIAD said:

Actually 3 if the hardware with software emulation combo of the ADAM+ by DVDH is considered. It is obviously a more expensive approach, but a very interesting one to consider especially with the interchangeable Snap Modules.

Maybe a total of 5 motherboard replacement projects...

  1. This topic's CV DIY project by @fieroluke
  2. @leaded solder's CV DIY version
  3. The Phoenix by Collectorvision
  4. The Adam+ by @DannyVdH
  5. And my CV-NUC+ mini console

I guess it's a good time to be around :)

  • Like 5
  • Thanks 1
Link to comment
Share on other sites

  • 1 month later...

@fieroluke I have a question for you.

 

If you used the @ChildOfCv's schematics as a reference in your design, did you find any discrepancies from reality? The reason I ask is that those are what I have been using, and as I get closer to creating physical boards, I'd like to know if there is anything I should be aware of. Although I gotta say everything looks correct, but it's always good to double check before spending money.

Link to comment
Share on other sites

I also based mine off the @ChildOfCv schematics. Probably would have been impossible without them, I am hugely grateful.

 

Those schematics were very accurate in my experience, I don't remember and/or haven't noted any errors at all on the schematic side. My bring-up problems were using the wrong footprint, various other rookie mistakes, multiple bad controllers, and trying to get away with a weird Sanyo video PSRAM that I didn't know how to drive. After that, it was all bad solder joints.

 

I did get rid of the original Coleco clock circuit, as I didn't understand it, and just ended up using two clocks, one 10.738... crystal for the VDP and an oscillator for the Z80/SN76489 although I think this might cause the two to be out of phase for some things. It's possible I've made an error there as sometimes it doesn't sound quite right (the background engine noise in Time Pilot seems to be absent, for example, and I remember it being super loud as a kid.) Eventually I think I will use the clock output from the 9918 to drive the Z80 in order to save the buck or two on the oscillator.

Edited by leaded solder
  • Thanks 1
Link to comment
Share on other sites

3 hours ago, leaded solder said:

I also based mine off the @ChildOfCv schematics. Probably would have been impossible without them, I am hugely grateful.

That's good to hear 👍

 

3 hours ago, leaded solder said:

I did get rid of the original Coleco clock circuit, as I didn't understand it, and just ended up using two clocks, one 10.738... crystal for the VDP and an oscillator for the Z80/SN76489 although I think this might cause the two to be out of phase for some things. It's possible I've made an error there as sometimes it doesn't sound quite right (the background engine noise in Time Pilot seems to be absent, for example, and I remember it being super loud as a kid.) Eventually I think I will use the clock output from the 9918 to drive the Z80 in order to save the buck or two on the oscillator.

Yeah I recall seeing your decision to use the independent clocks and also wondered if you would lose the synchronicity between the video chip and the CPU. For most things it's probably not a big deal since the video chip can be used as a standalone terminal. However where programmer's are pulling timing tricks to enhance the video beyond what that chip can normally do, I can see issues cropping up.

 

I opted to stay with the original synced tripler circuit for the video chip and also added an additional divider to step down the primary clock from 14.318 Mhz to the required 7.16 Mhz CPU clock frequency, thus allowing the use of a commonly stocked canned oscillator. I also added another divider from the 3.58 Mhz for the 1.79 Mhz required for the AY audio chip.

CV-NUC_System_Clocks.thumb.png.1b807e4307ef2c461e29719f661119ea.png

 

My theory on how the frequency tripler circuit works is as follows: The 2.7uH inductor with the 82 pF capacitor in parallel creates a resonant circuit in the inverter feedback loop that wants to oscillate at the required frequency, but not being crystal locked will drift over time. In order to prevent this, the 270 ohm/100 pf series circuit coming off the 3.58 Mhz clock sends a synchronizing pulse to the frequency tripler to keep it locked in place, and in step with the CPU clock.

 

  • Thanks 1
Link to comment
Share on other sites

I based my board on leaded solder‘s version. I think I found a missing connection somewhere in the roller controller interrupt circuit, but that was it. 
 

i liked the idea of leaded solder’s clean clock generation. As for the timing: it’s possible some assembler programmers relied on cycle counting but this isn’t 2600 programming fortunately, and the modern CMOS Z80 derivatives likely aren’t cycle accurate Z80 replicas. Remember, the games need to run on European VDPs at 50Hz as well, with very different video timings.

 

i opted to add a selectable divider to allow 3.58, 7.16 and 14 MHz crystals.

 

something I haven’t tested due to lack of equipment are driving and roller controllers. So if there is a bug in the weird roller interface with RC networks and transistors, that may still be in there.

 

Regarding the weird audio: maybe you have a bad Audio chip? I’ve had a batch of 10 brand new ones come with a bad one.

 

 

  • Thanks 1
Link to comment
Share on other sites

8 hours ago, fieroluke said:

Remember, the games need to run on European VDPs at 50Hz as well, with very different video timings.

Oh yeah I forgot about that. Coming from the Atari 8-bit land, I'm used to programmers pulling timing tricks to make up for the lack of sprites as compared to other systems, and to get more colors on screen. Often times this means different versions or ones with auto PAL/NTSC detection are required to work on all systems.

 

9 hours ago, fieroluke said:

something I haven’t tested due to lack of equipment are driving and roller controllers. So if there is a bug in the weird roller interface with RC networks and transistors, that may still be in there.

As an alternative to the Roller-Controller, here is the USB Mouse substitute that I prototyped successfully.

 

 

Of course you'll need to run a standard controller on Port#1 in parallel somehow so that you can still start a game ;)

Link to comment
Share on other sites

On 12/11/2022 at 2:05 AM, mytek said:

My theory on how the frequency tripler circuit works is as follows: The 2.7uH inductor with the 82 pF capacitor in parallel creates a resonant circuit in the inverter feedback loop that wants to oscillate at the required frequency, but not being crystal locked will drift over time. In order to prevent this, the 270 ohm/100 pf series circuit coming off the 3.58 Mhz clock sends a synchronizing pulse to the frequency tripler to keep it locked in place, and in step with the CPU clock.

That's pretty much it.  PAL Ataris do the same thing with the color burst signal.  The main clock "rings" the color burst bell every once in a while to keep it sync'd.

On 12/11/2022 at 2:23 AM, fieroluke said:

Remember, the games need to run on European VDPs at 50Hz as well, with very different video timings.

The TMS992x video chips all run on the same clock speed, whether PAL or NTSC.  They adjust the horizontal timing accordingly.  The only thing your software has to care about is that the interrupts from the VDP come in at 50Hz instead of 60.

  • Thanks 1
Link to comment
Share on other sites

  • 5 weeks later...
On 12/11/2022 at 12:36 AM, leaded solder said:

I also based mine off the @ChildOfCv schematics. Probably would have been impossible without them, I am hugely grateful.

 

Those schematics were very accurate in my experience, I don't remember and/or haven't noted any errors at all on the schematic side. My bring-up problems were using the wrong footprint, various other rookie mistakes, multiple bad controllers, and trying to get away with a weird Sanyo video PSRAM that I didn't know how to drive. After that, it was all bad solder joints.

 

I did get rid of the original Coleco clock circuit, as I didn't understand it, and just ended up using two clocks, one 10.738... crystal for the VDP and an oscillator for the Z80/SN76489 although I think this might cause the two to be out of phase for some things. It's possible I've made an error there as sometimes it doesn't sound quite right (the background engine noise in Time Pilot seems to be absent, for example, and I remember it being super loud as a kid.) Eventually I think I will use the clock output from the 9918 to drive the Z80 in order to save the buck or two on the oscillator.

I actually had the same clock idea for my project, after reading this I did some research and landed on the 82C84A clock generator chip as a different solution. Now there are plenty of new chips, but this one gives the original crystal clock frequency out, one that is a 3rd of the crystal, and one that is a half of the 3rd. Using the TMS 10.738635 Mhz clock (original is 633, but 635 works fine 0.00001 percent diff) this divides to 3.579545 Mhz. This is perfect for the sound/cpu. Only side note is the 3.579545 would be at a 33% duty cycle, possible issue?  The other clock isn't useful. I assume the clocks are in phase with this chip. Haven't gotten it in yet to test it. I do realize its a old stock part, but so is the TMS9928, and the SN76489. The 82C84A is easier to find due to it being used with the 8088 and such. **EDIT*** oh snap, the half freq of a 3rd will work for your additional sound chip without any complications.

Edited by electro_sparkles
  • Like 1
Link to comment
Share on other sites

2 hours ago, electro_sparkles said:

I actually had the same clock idea for my project, after reading this I did some research and landed on the 82C84A clock generator chip as a different solution. Now there are plenty of new chips, but this one gives the original crystal clock frequency out, one that is a 3rd of the crystal, and one that is a half of the 3rd. Using the TMS 10.738635 Mhz clock (original is 633, but 635 works fine 0.00001 percent diff) this divides to 3.579545 Mhz. This is perfect for the sound/cpu. Only side note is the 3.579545 would be at a 33% duty cycle, possible issue?  The other clock isn't useful. I assume the clocks are in phase with this chip.

I will have to scope an original ColecoVision to figure out if the clocks are in phase. If they are, a future revision should just use the 3.57MHz output from the TMS9918 directly, like the Sega SG-1000 does (the ColecoVision's original TMS9928 does not have this because they use that pin for one of the YCbCr outputs.) Thank you for the info about that clock generator, it looks like a very useful (and extremely period-correct) part that I'll have to look into further.

Link to comment
Share on other sites

1 hour ago, leaded solder said:

I will have to scope an original ColecoVision to figure out if the clocks are in phase. If they are, a future revision should just use the 3.57MHz output from the TMS9918 directly, like the Sega SG-1000 does (the ColecoVision's original TMS9928 does not have this because they use that pin for one of the YCbCr outputs.) Thank you for the info about that clock generator, it looks like a very useful (and extremely period-correct) part that I'll have to look into further.

Hmm, wasn't thinking of the TMS9918 (vs TMS9928/29). Makes sense, looking over the data sheet it looks like the TMS9128/29 switched GROMCLK for CPUCLK. That could be the best solution, only two memory chips (16Kx4-bit) really makes them ideal. Now the trouble is finding one (evilBay has the TMS9118).

 

Funny, I had the same thought about period correct. lol

Link to comment
Share on other sites

  • 2 weeks later...
On 1/13/2023 at 4:22 PM, electro_sparkles said:

Hmm, wasn't thinking of the TMS9918 (vs TMS9928/29). Makes sense, looking over the data sheet it looks like the TMS9128/29 switched GROMCLK for CPUCLK. That could be the best solution, only two memory chips (16Kx4-bit) really makes them ideal. Now the trouble is finding one (evilBay has the TMS9118).

 

Funny, I had the same thought about period correct. lol

Anecdotally, my TMS9918As were sourced from AliExpress (utsource would also be an interesting place to check out.) eBay is crazy expensive for components.

 

9118 is the one that uses 2 DRAMs, 9918 is the earlier part and uses the full set of... eight? I use a 62256 with Leonardo Miliani's design to adapt the TMS9918 to the slower, larger SRAM. I think it would be cool (if extraordinarily difficult) to have a shared-memory design one day. 9118s are a little less easy to get, I had to pick up a few to fix a Casio MSX1 and I found that it was more expensive than a 9918; maybe they made many fewer.

Edited by leaded solder
Link to comment
Share on other sites

I use an NTSC TMS9128 in my project which only requires two 16Kx4 bit DRAMs for the video memory. And I just stuck with the original 3.58 Mhz phase locked 10.73 Mhz frequency tripler oscillator circuit which is actually easy peasey to put together. Not sure what the advantage would be to change it. If it ain't broke, why fix it.

 

Now I'm curious as to what @fieroluke is using for the clocks in his creation?

 

EDIT: Added some schematic diagrams of what I am doing...

 

TMS9128 - Simplified VRAM

1436127341_CV-NUC_TMS9128.thumb.png.b78ff5e6805193f23eaffcda07d32c88.png

 

Divided Down 14.318 Mhz System Clocks -- Synchronized

 

2120644148_CV-NUC_System-Clocks.thumb.png.015e848a5520647fcd868dccd467d82c.png

 

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...

I wish this ColecoVision replacement board had a mini HDMI output instead of a RGB output. All modern computer monitors and Smart TV’s use HDMI, and having HDMI would make this product much more popular if its mass produced. I am guessing that this board will be firmware upgradable by the USB port.

I hope this product becomes a reality. Then I could plug my Expansion Module #3 ADAM computer into it and maybe even the Expansion Module #1 Atari 2600 adapter.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...