6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Thu Mar 28, 2024 9:04 pm

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Sun Jun 27, 2021 1:16 am 
Offline
User avatar

Joined: Wed Aug 05, 2020 8:41 pm
Posts: 47
Location: Montreal, QC, Canada
After not working on my SBC for some time, I got to have some fun this week with it.

Here's what I have so far on my 2MHz breadboard 6502 SBC: glue logic is handled by a PLD; a VIA that controls a 40x4 LCD and a PS/2 keyboard; an ACIA for terminal access; and now, as of today, a TMS9918A VDP with the static RAM replacement circuit. (Audio will come soon) After a bit of headbanging, I got the display to show some text from the initialization routine I found online. One thing I'm a bit disappointed in is the quality of the video. I know it's not high res, but it flickers on an LCD, and there's tons of color fringing. Tomorrow, I'll try it on my 1701 Commodore monitor and see how it behaves.

But here is my dilemma. I can't find a decent source of 6502 code to play around with to program the VDP. Sure I've seen some for the z80 and other CPUs, but the only assembler I know is 6502. When I try to "translate it", I start to have a "headache". For now, the VDP is still somewhat of a mystery for me, so if anyone can point me to code resources, that would be great.

Thanks,

EDIT: Tested it on my monitor, and the display is pristine. So I'm encouraged and relieved.

_________________
Fred Segard
A.K.A. The Micro Hobbyist
https://6502sbc.blogspot.com/


Top
 Profile  
Reply with quote  
PostPosted: Sun Jun 27, 2021 4:11 pm 
Offline

Joined: Fri Apr 15, 2016 1:03 am
Posts: 134
Take a look at https://github.com/cbmeeks/TMS9918
or try https://www.google.com/search?q=tms9918+6502

There are some limits on how fast the TMS9918 can accept commands. If exceeded, I've heard that display corruption may occur.


Top
 Profile  
Reply with quote  
PostPosted: Mon Jun 28, 2021 12:44 am 
Offline
User avatar

Joined: Wed Aug 05, 2020 8:41 pm
Posts: 47
Location: Montreal, QC, Canada
Did a lot of reading and coding today. Managed to better understand the TMS, and got it to work in its most basic form. Academically speaking, it's a milestone... a been there, done that moment... to a certain extent, of course. But I have some soul searching to do. I already have a terminal display (ACIA) AND a 40x4 LCD. Do I really need graphics? Will I ever program games? The answer is probably. It is after all a development system for me to learn all aspects of retro computing. But what is discouraging me right now is the quality of modern-day monitors that happen to have composite input, the display quality is not all that great. What I need is a standard definition Sony broadcast monitor... but I'm starting to run out of desk space... LOL

PS: My 1701 Commodore monitor only displays black and white for some reason. The text quality is amazing though. I don't know why there is no color. The cheap 7" monitor with composite in, shows color just fine, albeit with massive color fringing, and choppy text (most likely caused by the 720p upscaling).

_________________
Fred Segard
A.K.A. The Micro Hobbyist
https://6502sbc.blogspot.com/


Top
 Profile  
Reply with quote  
PostPosted: Mon Jun 28, 2021 2:01 pm 
Offline

Joined: Fri Apr 06, 2018 4:20 pm
Posts: 94
fredericsegard wrote:
Did a lot of reading and coding today. Managed to better understand the TMS, and got it to work in its most basic form. Academically speaking, it's a milestone... a been there, done that moment... to a certain extent, of course. But I have some soul searching to do. I already have a terminal display (ACIA) AND a 40x4 LCD. Do I really need graphics? Will I ever program games? The answer is probably. It is after all a development system for me to learn all aspects of retro computing. But what is discouraging me right now is the quality of modern-day monitors that happen to have composite input, the display quality is not all that great. What I need is a standard definition Sony broadcast monitor... but I'm starting to run out of desk space... LOL

PS: My 1701 Commodore monitor only displays black and white for some reason. The text quality is amazing though. I don't know why there is no color. The cheap 7" monitor with composite in, shows color just fine, albeit with massive color fringing, and choppy text (most likely caused by the 720p upscaling).


PAL shows up as black and white over composite on an NTSC monitor. Could it be that simple? Maybe you are outputting PAL, which would also explain the extra flicker on LCDs...


Top
 Profile  
Reply with quote  
PostPosted: Tue Jun 29, 2021 2:27 am 
Offline
User avatar

Joined: Wed Aug 05, 2020 8:41 pm
Posts: 47
Location: Montreal, QC, Canada
Hmmm, that was my thoughts too. My part number is actually TMS9918ANL. But I've seen part numbers TMS9918AN. Google is not too keen on telling me if one is NTSC and the other is PAL.

I got the chip from an eBay seller in China. My guess is its most likely PAL :-(

I think next time I'll buy a TMS9928A from the States instead. Better chance of it being NTSC.

_________________
Fred Segard
A.K.A. The Micro Hobbyist
https://6502sbc.blogspot.com/


Top
 Profile  
Reply with quote  
PostPosted: Tue Jun 29, 2021 8:47 pm 
Offline

Joined: Sat Jan 02, 2016 10:22 am
Posts: 197
The 9929A is the one designed for PAL, the 9918A and 9928A are intended for NTSC.

From the 1982 TMS9918A/TMS9928A/TMS9929A Video Display Processors data book:
Quote:
The TMS9918A/9928A have a 525-line format for U.S. televisions while the TMS9929A has a 625-line format for use
with the European PAL system.

So if you have a PAL model 9929A re-marked by a less than honest reseller as 9918A it would be outputting a 625 line 50hz signal.

I did a quick look inside a MTX512 that is definitely PAL, and the chip that's been in there since the mid 80s is marked TMS9929ANL. Which suggest the NL is possibly the packaging indication rather than anything to do with the design.

The quick way to tell if you have a scope would be to check pin 38. On the 9918A that's the CPU clock output at 3.58mhz. On the 9928A and 29A it's the R-Y colour difference. The frame rate will distinguish the 9929A as that's the only 50hz version.


Top
 Profile  
Reply with quote  
PostPosted: Sun Jul 04, 2021 10:38 am 
Offline
User avatar

Joined: Tue Aug 11, 2020 3:45 am
Posts: 311
Location: A magnetic field
There are multiple discussions on Reddit about interfacing 6502 and TMS9918A; mostly within Ben Eater's section.

_________________
Modules | Processors | Boards | Boxes | Beep, Beep! I'm a sheep!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 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: