universal2600 Posted November 26, 2012 Share Posted November 26, 2012 (edited) Hello I was wondering if its possible to interface a TIA from a 2600 (don't worry I got my TIA from a non-functional 2600) to a PC LPT port? My other question is: If I could interface the TIA to the PC LPT PORT could I use a Xilinx Coolrunner II CPLD to handle the processing OR would I need to have an FPGA OR MICROCONTOLLER? The only reason that I'm asking is because i have a couple of Coolrunner II's laying around and i want to put them to use. Basically My goal is to be able to send Data over the LPT to the TIA and be able to make music/sounds and create images/graphics Any Help would be very much appreciated So Thanks!!! Edited November 26, 2012 by universal2600 Quote Link to comment Share on other sites More sharing options...
Wickeycolumbus Posted November 26, 2012 Share Posted November 26, 2012 Anything is possible, right? Sounds like an interesting project. As you mention, you would probably want a microcontroller or other hardware to actually interface with the TIA. You could send commands via parallel port to the microcotroller/FPGA and it could control the TIA. Because of the way the TIA works, you need to constantly update it in real time. Video (and even sound) would be tricky to do otherwise. I recall seeing a project where someone made a video card for a computer using an NES's PPU. Quote Link to comment Share on other sites More sharing options...
kskunk Posted November 27, 2012 Share Posted November 27, 2012 (edited) I assume you know how to provide the TIA with a clock signal, and all the external components to generate a video and/or audio. Sound isn't so bad. To make sound work, you could use a CPLD to multiplex the parallel port's data lines into an address and data signal, forming register writes to update the sound periodically. You could probably do it with just one TTL latch. As Wickey hinted, video is not so easy. TIA places ridiculous timing demands on the host CPU, stricter than any graphics chip from that era. If you want to do video, synchronizing the timing of register writes with TIA's own clock will be your the main task. A picture can appear only while TIA is receiving a repeating, precisely timed, series of register writes. One slip in timing and the picture will spin out. Unlike audio, you probably can't use a direct interface for video, due to timing problems. Even the oldest, simplest, PC running DOS would have unpredictable timing due to bus activity beyond your control (such as memory refresh). Here's one approach for video: Continually repeat a "video program" to TIA, exactly 19,912 TIA cycles long for NTSC, or 23,712 cycles for PAL. Each cycle would set one address and write one data byte to TIA. You would arrange the register writes with the same timing and values as a real 2600 game would. You will probably need a FIFO to reclock the data coming out of the parallel port to match TIA's clock. Make sure to wire this FIFO to respect TIA's RDY line, or you will have trouble establishing sync. It might be difficult for some PCs to continuously write the required 2,386,362 bytes per second (one address byte, one data byte), but I've gotten an old parallel port in ECP mode to do this, so it's at least plausible. A fancier approach would be to turn the CPLD into a kind of "ANTIC" for TIA. In other words, add some local RAM for a "frame buffer", then have the CPLD synthesize the timed register writes required by TIA video, inserting graphics pulled from RAM. Then, provide a second interface for the parallel port to write to RAM. This eliminates the realtime requirements from the PC, and makes TIA act more like a 80s video chip. Sounds like a fun project, no matter how you attack it. Just getting TIA to display a solid square would be a huge accomplishment worthy of fame and praise! - KS Edited November 27, 2012 by kskunk 1 Quote Link to comment Share on other sites More sharing options...
universal2600 Posted November 27, 2012 Author Share Posted November 27, 2012 (edited) I assume you know how to provide the TIA with a clock signal, and all the external components to generate a video and/or audio. Sound isn't so bad. To make sound work, you could use a CPLD to multiplex the parallel port's data lines into an address and data signal, forming register writes to update the sound periodically. You could probably do it with just one TTL latch. As Wickey hinted, video is not so easy. TIA places ridiculous timing demands on the host CPU, stricter than any graphics chip from that era. If you want to do video, synchronizing the timing of register writes with TIA's own clock will be your the main task. A picture can appear only while TIA is receiving a repeating, precisely timed, series of register writes. One slip in timing and the picture will spin out. Unlike audio, you probably can't use a direct interface for video, due to timing problems. Even the oldest, simplest, PC running DOS would have unpredictable timing due to bus activity beyond your control (such as memory refresh). Here's one approach for video: Continually repeat a "video program" to TIA, exactly 19,912 TIA cycles long for NTSC, or 23,712 cycles for PAL. Each cycle would set one address and write one data byte to TIA. You would arrange the register writes with the same timing and values as a real 2600 game would. You will probably need a FIFO to reclock the data coming out of the parallel port to match TIA's clock. Make sure to wire this FIFO to respect TIA's RDY line, or you will have trouble establishing sync. It might be difficult for some PCs to continuously write the required 2,386,362 bytes per second (one address byte, one data byte), but I've gotten an old parallel port in ECP mode to do this, so it's at least plausible. A fancier approach would be to turn the CPLD into a kind of "ANTIC" for TIA. In other words, add some local RAM for a "frame buffer", then have the CPLD synthesize the timed register writes required by TIA video, inserting graphics pulled from RAM. Then, provide a second interface for the parallel port to write to RAM. This eliminates the realtime requirements from the PC, and makes TIA act more like a 80s video chip. Sounds like a fun project, no matter how you attack it. Just getting TIA to display a solid square would be a huge accomplishment worthy of fame and praise! - KS NOTE: THE FOLLOWING BELOW IS FOR PLAYING SOUND THROUGH THE TIA WITH THE PARALLEL PORT AND NOT TO SEND VIDEO!!!! Thanks For the Detailed info but now I'm at another question you said that I can use a TTL Latch for the TIA Audio so would I use a 74XX259 ic (This is a 8-Bit Addressable Latch logic ic) emulated on the CPLD (Which by the way is a Xilinx Cool Runner II) OR some sort of logic multiplexer ic (I'm not sure what type of multiplexer i need [is it a 74LS151 by any chance?] you would need to tell me this) and connect the Parallel port on the input side of the "Fake" (Fake meaning the logic is being emulated on a Xilinx Cool Runner II CPLD) Logic ic and the output of the Logic ic to the Address Lines OR Data Lines (I'm guessing you connect to the Data Lines From looking At this http://2600scene.net/links/addressdetails.htm )? And Now that Brings up another Question, Would I need to Write my own Driver to actually use this interface OR can I do it all in software? I'm asking this because I'm 16 With limited Programming Knowledge (Don't get me wrong I DO KNOW how to program but in Visual Basic and Java [Yes I know Java is VERY Similar in relation to C++ and I'm trying to learn that currently] But I DON'T know how drivers work unfortunately.) So Drivers Are Required Then the person behind coding that would be my older Brother Which is in college (His major is in Computer Science/Engineering) and could make this project take longer to complete since He has job interviews with Intel and is going to be flying to Seattle WA for a Job interview with Google (Seriously I swear I'm not making any of this up) around Christmas time and I have no idea how long Will take him If gets time to do it. (As you can see I am sometimes an impatient person). BUT ANYWAYS I'm starting to get off track So i have one more question, if i do not require the use of drivers could I possibly use Visual Basic to Get Access to the Parallel port (I'm just Asking this because I know you can access it but I don't know what level of access I will have) and then when/if I get access how and what ways can I send information to the Xilinx Cool Runner II and then to the TIA from the software to the Parallel port on the PC That Is, if this type of programming is even possible under Visual Basic. Sorry for all of the Text I forced you to Read but just needed some questions answered and this is the best way i could explain it I will let you know if I have more ANY HELP WILL BE GREATLY APPRECIATED THANKS!!!! Edited November 27, 2012 by universal2600 Quote Link to comment Share on other sites More sharing options...
universal2600 Posted November 27, 2012 Author Share Posted November 27, 2012 Oh and i forgot to add this: If i Wanted to Overclock the TIA what would be a safe MAX? and isn't the normal clock Frequency input on the TIA around 3.58 MHz? Quote Link to comment Share on other sites More sharing options...
Van Posted November 28, 2012 Share Posted November 28, 2012 Hi Universial2600, doing what you want is a BIG project. You should take a look at the projects @ Midibox.org, very simular to what you have in mind. There are quite a few Midibox projects; interfacing not only the SID chip, but Speakerjet, AY and Yamaha FM chips and a WIP to control a Pokey. The TIA is in many ways very primitive and as such requires 'a lot of tending'; getting control of it over ParPort would be a very demanding project. Consider that modern Win OS doesnt allow direct access to system hardware from user's progs, so this means you need to wright your own DLL or use one of the NTport DLLs. Using a microController will help a great deal, you can setup a serial link to a PC and allow the uC to handle the writes to TIA in real time. But this would require you to learn how to program the uC. You could look at the Arduino, nice C type IDE; very useful for this sort of thing ( there are already some Arduino projects like this). something along this line would allow for a USB link with a parallel interface to the TIA. An FPGA would allow even grater flexability, but the learning curve is much greater. In essences, you would be designing part of the A2600 on the FPGA. I dont know if there is a Open Core already but there is a lot of intrest in simular, I.E. Flashback is a A2600 on a FPGA. So it's do-able but you will have a hard time just using some latches if you'r using an OS newer then XP. Quote Link to comment Share on other sites More sharing options...
universal2600 Posted December 3, 2012 Author Share Posted December 3, 2012 Hi Universial2600, doing what you want is a BIG project. You should take a look at the projects @ Midibox.org, very simular to what you have in mind. There are quite a few Midibox projects; interfacing not only the SID chip, but Speakerjet, AY and Yamaha FM chips and a WIP to control a Pokey. The TIA is in many ways very primitive and as such requires 'a lot of tending'; getting control of it over ParPort would be a very demanding project. Consider that modern Win OS doesnt allow direct access to system hardware from user's progs, so this means you need to wright your own DLL or use one of the NTport DLLs. Using a microController will help a great deal, you can setup a serial link to a PC and allow the uC to handle the writes to TIA in real time. But this would require you to learn how to program the uC. You could look at the Arduino, nice C type IDE; very useful for this sort of thing ( there are already some Arduino projects like this). something along this line would allow for a USB link with a parallel interface to the TIA. An FPGA would allow even grater flexability, but the learning curve is much greater. In essences, you would be designing part of the A2600 on the FPGA. I dont know if there is a Open Core already but there is a lot of intrest in simular, I.E. Flashback is a A2600 on a FPGA. So it's do-able but you will have a hard time just using some latches if you'r using an OS newer then XP. so you're saying if i'm using windows vista or higher that i'll need to write some dll's to do this along with a microcontroller? also, could you explain to me how to latch the data (for example : what logic ic would i need, circuits,etc..etc). and write the code (possibly visual basic?) on windows xp since that is what i am using for now? thanks Quote Link to comment Share on other sites More sharing options...
universal2600 Posted December 3, 2012 Author Share Posted December 3, 2012 also if i were to use a microcontroller could I use a PIC for this or something better? Quote Link to comment Share on other sites More sharing options...
Van Posted December 4, 2012 Share Posted December 4, 2012 Like I said, this is a big project. Please have a look at the MidiBox projects, they have developed a very nice OS for the PIC and LPC micro controllers that is designed for these type of interfaces.. The LPC is a 32bit uC so it may be overkill but development would be in C rather then ASM. The 8bit PIC OS would require some ASM coding for the time critical tasks, but with the OS, developing a project is much easier then from scratch. That said, 'I' would chose a PIC, but that's my choice. You could also use an Adruino, there are lots of projects that bridge a PC to sound chips, search some of Little Scale's projects http://arduino.milkcrate.com.au/ As to the parts selection, this is very dependent on the interface. On the TIA side, you are dealing with parallel adr, data and control inputs. from the PC you have a serial stream with your data. Between these two is the big question. One choice is a uC with lots of pins that can drive the TIA pins directly (AKA Arduino); on the other hand you could send you data out of the uC over a serial channel to a shift reg such as 'HC595, with serial in-para out (AKA Midibox Hardware). To do this over the PCs Parallel port, you need a Latch, such as 'HC245, to hold the adr bits, a latch to hold the data bits and some lines to toggle the loading and transfers. OF course there are timing issues that you will need glue logic for. To my mind, I would rather get a Synth Cart for my A2600 and hook up a Highly-Liquid midi interface to the consul. By the way, Highly Liquid has posted the asm code as ope source, so if you want to get your feet wet, you could build your own midi interface. http://forum.highlyliquid.com/showthread.php?t=872 And if you really want to you could burn your own Synth Cart or use a Harmony cart, CODE HERE => http://www.qotile.net/synth.html Best of luck Quote Link to comment Share on other sites More sharing options...
Rybags Posted December 4, 2012 Share Posted December 4, 2012 Interesting project - people have been doing similar with Pokey. Advantage there is you have 2 extra voices and a lot bigger frequency range. Quote Link to comment Share on other sites More sharing options...
Keatah Posted December 4, 2012 Share Posted December 4, 2012 One thing for sure, this would be the "lowest transistor count" multimedia chip ever for the PC. Quote Link to comment Share on other sites More sharing options...
Van Posted December 4, 2012 Share Posted December 4, 2012 Here is another good project http://www.soniktech.com/tsundere.php As I understand it; an Adruino connected to a NES 2A03 cpu. A little different from this topic, in that the 2A03 being a cpu, 'expects' total control of the bus. So the Adurino acts as a peripheral device on the 2A03 side and a Midi in device to the outside world. The Adurino code feeds the 2A03 with the instructions to cause it to 'play' sound in a simple endless loop, modifying the pitch according the the received midi note . For our discussion, the TIA is a bus peripheral, so the Adurino would act as the bus master; doing a similar function but controlling the data flow. So with a little re-work of the Adruino code and the glue logic between the two to suit the TIA, you'r there. On the PC side, you could use your fav tracking/sequencer software and a USB to midi doggle. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.