It is currently Sun Aug 19, 2018 8:42 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Tue Mar 19, 2013 9:52 am 
Offline

Joined: Tue Mar 19, 2013 9:30 am
Posts: 25
Hello there,

I played some NES games using Micro Genius (I'm in SE Asia) when I was just a little kid, and then much later in my life, I'm into the PC world. Plus, I did a lot of microcontroller projects in my free time too.

Unfortunately, I can't find my Micro Genius anymore, prolly it was disposed. So I happened to have bumped into eBay one day and found those PPU clones sold cheaply, which are the UMC 6538. I assumed it's the same as the NES's one, so I'm just wondering, would it ever work if I connect it to, say, an Atmega644 (or PIC18F), plus some 62256 SRAM in my drawer? Could I write some commands in the microcontroller first and coax it to display a tile/sprite or something on a TV?

Or, should I really need to pair it with the 6502?


Top
 Profile  
 
PostPosted: Tue Mar 19, 2013 10:25 am 
Offline

Joined: Sat Jan 23, 2010 11:41 pm
Posts: 1161
It is certainly possible. I recall HardWareMan (he is on this forums) once connected the PPU to an old Soviet 8-bit computer (8080 based).


Top
 Profile  
 
PostPosted: Tue Mar 19, 2013 10:46 am 
Offline
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 3111
Location: Tampere, Finland
Brian Provinciano ("BriPro") also had a project on his old site where he connected the NES PPU to PC's ISA port.

FYI, to get started, you don't even need to connect any of the PPU address pins, because you can get some simple colors rendered by simply setting the palette and pointing the PPU address at one of the palette entries, while keeping rendering disabled.

_________________
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi


Top
 Profile  
 
PostPosted: Tue Mar 19, 2013 7:07 pm 
Offline

Joined: Tue Mar 19, 2013 9:30 am
Posts: 25
Thanks for all the opinions. I thought it may seem impossible at start, but it's actually do-able. Right now all I can get is the new (or new old stocks) clone versions of these PPUs as the original ones are dead expensive.

I've read a bit about the 6502 - and it seems the modern 8-bit microcontrollers are much faster and convenient than this 6502, except the microcontrollers have fixed amounts of flash ROM. I may need to wait for the PPU to come as I'm buying from eBay and it ships from China.


Top
 Profile  
 
PostPosted: Fri Apr 12, 2013 11:29 pm 
Offline

Joined: Tue Mar 19, 2013 9:30 am
Posts: 25
I just got a batch of these clone PPUs too (UA6538) days ago too. However, I cannot seem to find 26.60712MHz oscillator in my place, the nearest is only 27MHz.

Should I really get the 26.607MHz oscillator, or just go for the 27MHz one? :D


Top
 Profile  
 
PostPosted: Sat Apr 13, 2013 12:50 am 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 7393
Location: Seattle
The 26.6 (exactly 6×PAL colorburst) MHz crystal is needed for PAL colors to work correctly; if you don't use exactly that your colors will most likely be wrong (probably rainbows). But 27MHz will be enough for displaying anything at all. (1.5% error is fine for all the other video timings)

It's not clear you'll be able to find the 6× crystal; you may need to build some other circuit that rings at the requisite frequency. (e.g.: extracting odd overtones from square waves is easy)


Top
 Profile  
 
PostPosted: Sat Apr 13, 2013 5:31 am 
Offline

Joined: Tue Mar 19, 2013 9:30 am
Posts: 25
lidnariq wrote:
The 26.6 (exactly 6×PAL colorburst) MHz crystal is needed for PAL colors to work correctly; if you don't use exactly that your colors will most likely be wrong (probably rainbows). But 27MHz will be enough for displaying anything at all. (1.5% error is fine for all the other video timings)

It's not clear you'll be able to find the 6× crystal; you may need to build some other circuit that rings at the requisite frequency. (e.g.: extracting odd overtones from square waves is easy)


Thanks for the info. I searched and searched in element14 and nearby electronic component retailers but all I ended up is a 26 or a 27MHz crystal.

Would that video synced or to lock properly on the TV with a small error?


Top
 Profile  
 
PostPosted: Sat Apr 13, 2013 5:33 am 
Offline

Joined: Sat Jan 23, 2010 11:41 pm
Posts: 1161
80/3=26.6.


Top
 Profile  
 
PostPosted: Sat Apr 13, 2013 6:35 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 20420
Location: NE Indiana, USA (NTSC)
80/3 = 26.6667 MHz is about 1 part in 400 off from the true 26.6017. That'll work great for black and white. But to avoid rainbowing at the right side, you'll need the difference in subcarrier phase to be less than (guessing) 1/20 of a cycle by the right side. Now phase is the integral of frequency, and over the 52 microseconds of each scanline, there are about 230 cycles of the subcarrier. This means the frequency difference needs to be less than about 1 part in 5000.


Top
 Profile  
 
PostPosted: Sat Apr 13, 2013 7:06 am 
Offline

Joined: Tue Mar 19, 2013 9:30 am
Posts: 25
Hmm. Ugh, I can't seem to find any exact 26.6MHz oscillators inside. I guess I should get the NTSC variant of the PPU, as the frequency for the oscillator is much more available at my place. :)


Top
 Profile  
 
PostPosted: Sat Apr 13, 2013 10:15 am 
Offline
User avatar

Joined: Wed Feb 13, 2008 9:10 am
Posts: 655
Location: Estonia, Rapla city (50 and 60Hz compatible :P)
Get a PLL of some sort and use on to multiply 4.433619MHz signal to 26.601712MHz. Will also work for making 3.579545MHz to 21.47727MHz.

_________________
http://www.tmeeco.eu


Top
 Profile  
 
PostPosted: Sat Apr 13, 2013 10:58 am 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 7393
Location: Seattle
For NTSC, you won't be able to find 6× crystals either. You're going to have to build or buy a PLL or some other frequency multiplier regardless of the PPU you use.

Here's a non-PLL solution using a 4x clock source (I know that crystal frequency is available). It divides by 2, then multiplies by three:
Attachment:
1½×.png
1½×.png [ 979 Bytes | Viewed 4447 times ]

If you change the frequency you drive it at (e.g. switching to NTSC), you'll need to change the LC. (2π√(L·C) = desired output frequency, and that needs to be an odd multiple of the input frequency)
You'll probably want to put a trim capacitor or trimmable inductor. A PLL should be less fiddly.


Top
 Profile  
 
PostPosted: Sat Apr 13, 2013 10:03 pm 
Offline

Joined: Tue Mar 19, 2013 9:30 am
Posts: 25
Whoa, thanks. Real tough job. But I'll still do it, the tougher it is, the better it is! :)

I'd try to get a cheap adjustable oscillator pack from ebay which I would tune it to 26.6MHz first and look in the oscilloscope screen.

Also, I found a couple of the 26.60MHz crystals around in Taobao, prolly will get some of these and make an oscillator from the inverter chip. I still need to ask them about the specifications first. :)


Top
 Profile  
 
PostPosted: Mon May 06, 2013 2:08 am 
Offline

Joined: Tue Mar 19, 2013 9:30 am
Posts: 25
Sorry for bumping up the post. My interfacing attempt has been very slow due to work and stuff.

I got these 26.601712MHz crystals finally from ebay, and unfortunately it's not a direct standalone oscillator, so I have to couple this crystal with another few components to make it complete.

Would using the chip inverter (not gate) and a few caps generate the intended 26.601712MHz clock? All I know that I can't use the CD4069 because it's too slow.

Or, should I use the transistor ones for better stability?

Love to hear the opinions. :)


Top
 Profile  
 
PostPosted: Mon May 06, 2013 12:25 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 7393
Location: Seattle
I have never actually seen a comprehensive list of "here's all the ways you could build a quartz crystal driver, and here's when you'd rather one vs another", but then again, I haven't looked at a copy of Art of Electronics in quite a while.

Sorry I'm only providing you with a "dunno".


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group