- 5
- 31 240
krallja
United States
เข้าร่วมเมื่อ 19 ส.ค. 2006
TMS9918A Static VRAM
"SRAM Replacement for TMS99x8 VRAM" by Tom LeMense, January 24, 2010 - retrobrewcomputers.org/n8vem-pbwiki-archive/0/35845334/48860720/33053543/SRAM%20Replacement%20for%20TMS99x8%20VRAM.pdf
TMS9918A Video Card Kit for RC2014 by Kamprath LEDs - www.tindie.com/products/mfkamprath/tms9918a-video-card-kit-for-rc2014/
The assembly code in the video - github.com/InPermutation/be6502/blob/Static_VRAM/vdp.s
TMS9918A Video Card Kit for RC2014 by Kamprath LEDs - www.tindie.com/products/mfkamprath/tms9918a-video-card-kit-for-rc2014/
The assembly code in the video - github.com/InPermutation/be6502/blob/Static_VRAM/vdp.s
มุมมอง: 7 959
วีดีโอ
TMS9918A on 6502
มุมมอง 9K4 ปีที่แล้ว
Use the TMS9918A chip from 1983, again, to show one color on a TV screen, driven by a 65C02S-based computer on a lot of breadboards. (A board sandwich? I'm hungry.) Uses the 74HCT138 included in Kamprath LED's TMS9918A Video Card Kit for RC2014 (www.tindie.com/products/mfkamprath/tms9918a-video-card-kit-for-rc2014/) as an address decoder.
TMS9918A on Arduino
มุมมอง 14K4 ปีที่แล้ว
Use a chip from 1983 to show fifteen different colors on a TV screen, with a Mega2560 and a breadboard. TI TMS9918A datasheet: archive.org/details/Texas_Instruments_TMS9918A Arduino sketch: github.com/InPermutation/tms9918a-arduino
AUUUG Through days of finding why my screen had blue garbled text I realized that as krallja said in the previous tutorial that the clock needed to be delayed a bit and at the time it worked without the delay (pin 3 of '138 connected straight to clk instead of connecting straght to pin 20 of 6502 ram for delayed clock) The circuit is now working wonderfully when inverting the clock line 4 times. Now i can start coding! thanks!!
Hi, this video is amazing! I really appreciate making it! I bought the Ben Eater kit a while back in 2020 with his "world's worst GPU" and put the two together. a week ago, I decided I wanted to start from scratch and eventually make a PCB, so I've been doing research and I think I am going to try and use a TMS9918A, AY-3-8910, a VIA, 16KB ROM, 32KB RAM, and one more device I haven't decided on yet (my memory mapping allots me one more I/O) maybe an ACIA, though I can't find those anywhere. Anyways thanks to your videos I have a really good basis to test the TMS9918A and get familiar with it, and learn how retro computers and consoles used nametables, pattern tables, and sprites to write to displays. My TMS9918A should be here tomorrow so I'm excited to test it. Do you have any plans to continue this series and go over sprites? Thank you.
You've got to get some extra points for pointing out that 6502 is Von Neumann architecture, not like AVR's Harvard architecture. :)
Is there any way to do this with an Arduino Uno instead of an Arduino Mega?
Yes, the only difference is you only need to configure Arduino IDE to program your device, and make sure the ADDR array in the sketch is set according to the pins you used on your Uno.
thank you for the info!@@krallja
Did you have to do any particular work into choosing the capacitor values to use with your crystal?
No, I didn’t - these capacitors were from the kit by Mr. Kamprath. Someone else did the work for me😂
@@krallja :)
@@krallja My colors works on some LCDs but not others; on some the colors show up as alternating white black bars in different patterns (like Apple 2 color graphics on a monochrome display). I haven't tried it on an actual CRT yet, because my CRTs are in my office at work, which I can't get to for 8 weeks because of asbestos abatement and roof repairs, ugh...
@@Lantertronicsthe …peculiar… color burst frequency of this chip means it won’t be 100% compatible with some LCDs framebuffer decoders. a raster display like a CRT or DLP will probably do better
after testing with many caps i found that 33pf worked for me on the crystal
I recently came across your channel and I'm really enjoying these videos! I hope you can produce more soon! It would be great to see you continue with this project
NOP loop?
right! $EA (shown in green LEDs) is NOP
@@krallja very cool! You planning on writing some software for it?
Interesting project. I would have love to see the sprite demo!
What other chip: SOUND ! (like the YM2149F)
Hi !! Can you provide a schematic link with this latch converter to replace VRAM kind used in this project ?? Is a super good insight to replace annoying -5v in all projects !! Thanx so much !!
Hi! I adapted it directly from Michael Kamprath’s GitHub: github.com/jblang/TMS9918A/blob/master/TMS9918.pdf
@@krallja Super thanx !! A hundred likes 👍🏻
Do they still make any chips that output video like this?
I dont think so unless u wana use fpgas
Nice to see you are still into this project! Your earlier videos were a massive resource for me to use the TMS9918 in my own retrocomputer project
I have a dumb question, is it possible to connect a PC DIMM to it? I'm not saying the modern DDR RAMs, but the first SDRAMs. I think it is possible to connect to it's bus but voltage may be an issue
Very nice! The TMS9918 saga continues! Maybe you can make a simple game with it
A few months back I wrote an emulator for the version of the TMS9918A used in the Master System, so it's really interesting seeing this from the other side.
Very highly quality content. Thank you. I've been looking to follow another Ben Eater. Happy I found your video.
Why 32 kB of RAM on a chip that can only manage 16 kB of RAM?
It was cheaper to buy a 32KiB SRAM than a 16KiB SRAM, for some reason.
This is great! Any plans to make it work with a keyboard so you can type stuff onto the screen? I finished my BE6502 a while back and that's been my next goal.
It's not the delay of the additional NAND, it's that the RAM /CS signal is qualified by the Phi2 clock (CLK). When Phi2 is high, the address lines are stable and teh data is stable when it goes low. That CLK signal you show is the Phi2 clock. If you took that CLK and connected it to pin 6 of the 74LS138 (the positive enable, E3) you would be even better off.
Thank you for making this video series - it's been a tremendous help with hooking up my own TMS9918 to a 6502 based computer I've been working on, and these videos have saved me a lot of trouble. Thanks again.
Sorry - I forgot to ask in my previous comment: what are the “more stringent timing requirements” when the display is enabled? If you could point me in the right direction, that would be great. Also - any plans for a video on sprites that you mentioned? 😁
Very interesting! I'll have to check out your subsequent videos on this topic.
Thanks for making the video! Greatly enjoyed.
hi, I've been trying to get my tms9918 to work with the arduino , tv connects saying ntsc input signal but all oi get is black and white vertical lines that change pitch as colour changes from arduino. any ideas?
A friendly reminder (disclaimer?) to upload your video with RAM on it so as to be showing the TV displaying something extra such as text or a spline or triangles, etc. My comment has no hate in it and I do no harm. I am not appalled or afraid, boasting or envying or complaining... Just saying. Psalms23: Giving thanks and praise to the Lord and peace and love.
Nice! 👍 For first run, I will, definitely, wire up video RAM.. That will display garage on screen to verify, that video chip is actually working.. Probably, I'm old school, but assembler better fits in to my brain logic.. 😂 That's why I don't use Arduino, but program Atmel chips directly..
do please revisit this project, by adding a 65c51 serial interface that can take keyboard input and display the text mode screen output and also being able to load/push programs into ram.
Any chance of sharing the source code you used for both the lcd and tms9918a basic please. i am in the process of building an Eater 6502 with display and have the tms9918a on order
The TMS9918A source code is on my GitHub, but I haven’t committed BASIC yet. I’d like to do a video series on that… someday…
@@krallja oooh cant wait for that! a detailed explanation of what needs doing to get the core basic runnung would be great. are you adding an ay3 sound chip as that would be handy also
I would really like to build this but I dont really get what kind of chips i need to get, can you help me with that?
And a schematic would be good too
I seem to have a problem when compiling. I keep getting the error ""missing end directive for macro "vdp_write_vram""" Any idea what might be the problem? VASM seems to compile correctly for other programs. Thanks for these videos!
There is a common version of Vasm for Windows which has this bug with macros. You can either expand the macros by hand, or update Vasm.
@@krallja thanks for the reply. Now getting the problem PHX and PLX are not instructions supported. I downloaded the new VASM.
@@keithbecker3142 pass the -wdc02 flag to Vasm to enable WDC65C02 instructions (assuming you’re using the WDC processor that Ben Eater’s kit comes with)
Nice video. This project is pretty similar to one that I was working on back in 2019. I did actually use dram for the vdp chip but I used 4164s instead of 4116s. These are a bit easier to use as they only need 5v and I had some left over from repairing a ZX Spectrum. I need to go back to that project, I had it working but it was getting a bit too flaky on the breadboards and I was spending more time trying to find bad connections than actually doing the computer. I had an ay-3-8910 that was controlled through a 6522. The 6522 was also doing the baud rate generation for a 6850 uart. The computer was running Lee Davisons Ehbasic. The serial io and putting text on screen was done with interrupts with basic using a buffer for the chars. Watching these videos is giving me some motivation to get back to the project. I had quite big plans for it with a section of ram being paged and even an ide interface and implementation of a basic fat filesystem.
100 likes!
9:16 It's an emitter follower circuit, to drive the 75Ω coaxial cabel (and impedance matching), that's why R1 is 75Ω.
It must be a mistake, then - there isn’t a coaxial cable attached, just a plain RCA composite cable.
@@krallja Oh... My apologies. But it happens that the RCA Composite Video cable is also 75Ω impedance, so it may still make sense. en.wikipedia.org/wiki/Composite_video#Connectors_and_cable
@@chenzhuoyu1992 makes sense! i am at the start of the chapter on simple transistor circuits in my electronics textbook, so hopefully it’ll make more sense to me soon.
There have been no new videos for a long time. Will there be new videos with 9918, 6502 and sprites? Thanks for the interesting videos!
any success with the sprites ?
You are awesome, don't stop making videos like this, thanks
Please, more about this using Arduino!!! Please!!!
I followed all your videos and built the circuit with your initialization code yesterday. It works!!!! Thank you for the inspiration. Now all I need is some reference code to actually use the VDP. A library of basic functions, if such a thing exists. 6502 resources for the TMS9918A are scarce, and I'm no programmer, so the Z80 code I found so far is, for now, quite confusing to me. If you know of any, can you point out a good one? If not... well, I'll have to headbang through the cryptic documentation and try to make sense of it. LOL
I'm not aware of anything. Hopefully we can create a nice library of basic VDP functions as part of this video series!
Early on in the video, we see you are using BASIC. Which version of BASIC are you using? And where can I find it?
It's actually a camera trick: I only had the PS/2 keyboard typing directly to the LCD :D If you're looking for a BASIC to adapt to your BE6502, I would recommend TinyBASIC. Jeff Tranter has a well-annotated version of it on his GitHub page.
Jeff Tranter also has a copy of EhBASIC, which is designed to be easy to adapt to any 6502-based system. github.com/jefftranter/6502/tree/master/asm/ehbasic
That was awesome! Of course you could have used 4bit Drams and saved yourself alot of wiring. :-) Cant wait for the next installment.
How is the project going? I'm in the same boat so waiting for the next video!!
I’ve been looking for an easy way to add a display to my Ben Eater kit 6502 computer and I found this super helpful and informative. Thanks so much for sharing.
To anyone building this circuit: When I first connected the all of the HCT574s' AD0-7 wires as shown in the video, my monitor outputted random values. I then flipped two of the HCT574s' AD0-7 connections, and it worked beautifully. I flipped the wires going out of the TMS9918A and into the left 574, and the wires coming into the right 574, relative to then ones shown in this video. It then worked perfectly!
Thanks Matthew for the suggestion! Your solution worked for me also.
Hi Matthew. Can you upload your assembly code? I seem to be having an error missing end directive for macro "vdp_write_vram" when compiling? I was able to get the yellow to display correctly on the last video
My code is too long for a comment, but I think you need a different version of the compiler that allows macros. I think I had to ask Kralja how to get his special version of the compiler to allow macros. It might be posted on his Github!
Great video, super helpful! Is there anywhere I can find an explanation of your assembly code and the source file?
BTW, the goal of the project i'm working on is to have Ben's 6502 work with the tms9918a, Ben's PS/2 keyboard circuit, and some form of basic. I would like the user to be able to do simple things like look at register data, enter simple commands like add 2+2 and so forth. If you have any advice on how to implement all of these things together I would greatly appreciate it. You've already been an incredible help with your videos!
@@matthewwallace9686 github.com/InPermutation/be6502/blob/Static_VRAM/vdp.s is the latest version of the VDP control assembly. I’d like to do a series on implementing BASIC some day.
@@krallja I can't put into words how helpful you are lol its amazing
@@krallja does "-- INSERT --" on the program text mark the end of the program?
@@matthewwallace9686 yes, that’s the status bar of Vim I think
is the Arduino code available?
Hey Matthew, I've uploaded it to my GitHub - github.com/InPermutation/tms9918a-arduino
Do I need a particular monitor resolution for this to work?
It outputs an NTSC composite analog signal, so you need a composite monitor or a TV with a yellow RCA jack. (There’s also a PAL version of the chip too, if you live in a 50Hz country.)
@@krallja Thanks! So the monitor's resolution isn't a problem?
@@matthewwallace9686 right, the NTSC analog standard was the same 525-line 29.97fps interlaced signal throughout its long life. Any TV or monitor with composite input should be able to display it.
@@krallja thank you so much
This channel is incredibly underrated. You've been a huge help for my senior project!
cant wait for the next one!
I've been working on hooking up a tms9918 and a ay-3-8910 to a 6502 machine, which I based the design on ben eater's 6502 machine, and these videos you made really made the difference on the progress I'm making, for the glue logic since I don't have a 74x138 I designed some logic using nand gates and used the 6000 address space for the 6522 and the 7000 address space to the tms9918 (of course I had to mess a bit with the 6522 glue logic) and it all ended up working perfectly! If you read all this I just want to thank you for your work on making these videos and your care in explaing the viewer what's going on, greetings from Portugal!
Thanks for sharing! I’m glad you got an address decoder circuit working with NANDs. I’d like to play with sound chips soon.