6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Nov 24, 2024 8:41 am

All times are UTC




Post new topic Reply to topic  [ 66 posts ]  Go to page 1, 2, 3, 4, 5  Next
Author Message
PostPosted: Mon Jun 10, 2024 1:22 am 
Offline
User avatar

Joined: Wed Aug 18, 2021 1:35 am
Posts: 72
Location: South Australia
Hi all,

I know a number of you are using (or planning to use) TMS9918A VDP in your homebrew projects (including myself). Thought I should share my new project: A drop-in replacement for the TMS9918A using a $4 Raspberry Pi Pico.

Here's a couple of videos showing it in action:


The hardware supports 12-bit VGA rather than Composite or YPrPb. Currently, I'm only implementing the original TMS9918A/TMS9929A, though I could certainly look into implementing some of the awesome F18A features in the future.

The PICO9918 is much easier to hook up than a TMS9918A since the VRAM and Clock is all handled in-house. I'm at an early stage hardware-wise where I'm using an off-the-shelf Pi Pico. I plan to incorporate the RP2040 directly in a future revision, further shrinking the package.

I've shared all the source code on GitHub: https://github.com/visrealm/pico9918

_________________
Cheers
Troy

[My introduction]


Top
 Profile  
Reply with quote  
PostPosted: Mon Jun 10, 2024 5:27 am 
Offline

Joined: Mon Jan 19, 2004 12:49 pm
Posts: 988
Location: Potsdam, DE
Interesting, Troy.

Though I was unable to view the videos on Youtube; instead I got unskippable video game spam, and get-rich-quick spam in German, and nothing else. I had to use FreeTube to view the actual videos (which appear impressive though I'm not familiar with the capabilities of the chip itself).

Neil


Top
 Profile  
Reply with quote  
PostPosted: Mon Jun 10, 2024 5:54 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
(Just to note, the youtube videos work for me)

Nice work Troy! The Pico is a great thing very suitable for retro projects.


Top
 Profile  
Reply with quote  
PostPosted: Mon Jun 10, 2024 6:21 am 
Offline
User avatar

Joined: Wed Aug 18, 2021 1:35 am
Posts: 72
Location: South Australia
barnacle wrote:
Though I was unable to view the videos on Youtube; instead I got unskippable video game spam, and get-rich-quick spam in German, and nothing else.

That's a shame (and completely out of my control).

They're genuine YouTube links - I don't get any ad money, or anything else from YouTube. If YT places unskippable ads on them, I can't change that unfortunately. :(

Glad you persisted though :)

BigEd wrote:
(Just to note, the youtube videos work for me)

Good to know. Thanks, Ed.

_________________
Cheers
Troy

[My introduction]


Top
 Profile  
Reply with quote  
PostPosted: Mon Jun 10, 2024 8:13 am 
Offline

Joined: Mon Jan 19, 2004 12:49 pm
Posts: 988
Location: Potsdam, DE
Thanks Troy; not sure what happened there. It looked like YT replaced your videos entirely with spam videos instead... odd, because I have adblockers active when I use YT exactly to avoid that.

What I need to do now is find a convenient guide to bit tickling with the RP2040...

Neil


Top
 Profile  
Reply with quote  
PostPosted: Mon Jun 10, 2024 9:50 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
There's an enormous datasheet but it's well written and well organised. It has a whole chapter on the PIO engines and twenty pages of examples
https://datasheets.raspberrypi.com/rp20 ... f#page=344
Edit: also a chapter in the SDK docs
https://datasheets.raspberrypi.com/pico ... df#page=31

There's the code for this project, of course
https://github.com/visrealm/pico9918

There are also other existing open source projects which interface with 8 bit busses, for example
https://github.com/oliverschmidt/a2pico
https://github.com/dp111/PicoTube
https://github.com/hoglet67/pico_bus6502
https://github.com/hoglet67/pico-swram

Dive into the code and have a look around at what's been done...


Top
 Profile  
Reply with quote  
PostPosted: Mon Jun 10, 2024 12:07 pm 
Offline

Joined: Mon Jan 19, 2004 12:49 pm
Posts: 988
Location: Potsdam, DE
Thanks, ploughing through the 'getting started' docs.

I may be some time...

Neil :mrgreen:


Top
 Profile  
Reply with quote  
PostPosted: Mon Jun 10, 2024 12:48 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
Oh, for those who like videos, here's a playlist, seems sensible and well-paced:


Top
 Profile  
Reply with quote  
PostPosted: Tue Jun 11, 2024 11:51 am 
Offline
User avatar

Joined: Wed Aug 18, 2021 1:35 am
Posts: 72
Location: South Australia
Had a number of people asking about 80 column mode too. So, I added that this evening:

https://www.youtube.com/watch?v=qdCapu0CVJ8

_________________
Cheers
Troy

[My introduction]


Top
 Profile  
Reply with quote  
PostPosted: Tue Jun 11, 2024 5:10 pm 
Offline

Joined: Mon Jan 19, 2004 12:49 pm
Posts: 988
Location: Potsdam, DE
That PIO is looking very interesting... I think I need to get one of these. Or indeed, more than one, since I'm bound to break some.

But I fancy a graphics co-processor; spitting out 16-level greyscale at 640x480 VGA would appear to be easily within the bounds of possibility. Add a side order of 6800 bus and serial and PS/2 all in one part - there's a lot to recommend it.

Neil


Top
 Profile  
Reply with quote  
PostPosted: Tue Jun 11, 2024 5:15 pm 
Offline

Joined: Thu Mar 03, 2011 5:56 pm
Posts: 284
Awesomer and awesomer!

The RP2040 really seems to be a versatile part (in the right hands... I have on two RPI picos, but haven't done anything with them).


Top
 Profile  
Reply with quote  
PostPosted: Thu Jun 13, 2024 6:56 am 
Offline
User avatar

Joined: Wed Aug 18, 2021 1:35 am
Posts: 72
Location: South Australia
barnacle wrote:
That PIO is looking very interesting... I think I need to get one of these. Or indeed, more than one, since I'm bound to break some.


PIOs are great!

I'm using them for the VGA output, combined with DMA, so that's fairly hands-off (or CPUs-off perhaps?) once you set it going. Just need to provide it with a scanline of RGB data via an interrupt/callback whenever the PIO requests it.

I'm also using PIOs to generate the GROMCLK and CPUCLK output signals. These are just square waves at a set frequencies (~470KHz and ~3.4MHz). Once again, set up the PIO, tell it what to do and off it goes - set and forget.

I'm not using PIOs for BUS interactions. Here, I'm using a GPIO interrupt handler which is triggered when the READ or WRITE signals change. It (very quickly ~32 clock cycles max for a 4MHz bus) handles the request.

There are two CPU cores. One is pretty much twiddling its thumbs, waiting for interrupts from the VGA PIOs. The other is frantically generating scanlines.

rwiker wrote:
Awesomer and awesomer!

The RP2040 really seems to be a versatile part (in the right hands... I have on two RPI picos, but haven't done anything with them).


Thanks!

100%

_________________
Cheers
Troy

[My introduction]


Top
 Profile  
Reply with quote  
PostPosted: Sat Jun 15, 2024 4:46 pm 
Offline

Joined: Mon Jan 19, 2004 12:49 pm
Posts: 988
Location: Potsdam, DE
Pretty much the same as I had in mind. I'll order a couple up when I get back from this trip to Italy (take a 30-year old car from the UK to Turin via Berlin and meet up with some old friends)


Top
 Profile  
Reply with quote  
PostPosted: Sat Jun 15, 2024 6:35 pm 
Offline

Joined: Wed Nov 11, 2020 10:42 pm
Posts: 104
Location: Kelowna Canada
Looking forward to seeing if this migrates to the Pico-56 (at least the software side) not sure if that is possible or in the plans. For those looking at the Pico there is active development using MMBasic (https://geoffg.net/picomitevga.html) that is fun in its own right as well as exposing the hardware interface (I2C,SPI, etc) to basic makes quick and easy interfaces without Python or C required.


Top
 Profile  
Reply with quote  
PostPosted: Mon Jun 17, 2024 6:47 pm 
Offline
User avatar

Joined: Wed Aug 17, 2005 12:07 am
Posts: 1250
Location: Soddy-Daisy, TN USA
visrealm wrote:
Hi all,

I know a number of you are using (or planning to use) TMS9918A VDP in your homebrew projects (including myself). Thought I should share my new project: A drop-in replacement for the TMS9918A using a $4 Raspberry Pi Pico.

Here's a couple of videos showing it in action:


The hardware supports 12-bit VGA rather than Composite or YPrPb. Currently, I'm only implementing the original TMS9918A/TMS9929A, though I could certainly look into implementing some of the awesome F18A features in the future.

The PICO9918 is much easier to hook up than a TMS9918A since the VRAM and Clock is all handled in-house. I'm at an early stage hardware-wise where I'm using an off-the-shelf Pi Pico. I plan to incorporate the RP2040 directly in a future revision, further shrinking the package.

I've shared all the source code on GitHub: https://github.com/visrealm/pico9918


You sir, just made my decade. I've been doing a lot of VGA work with the Pico lately (well, been a few months).

https://github.com/cbmeeks/VgaPico

The primary goal for my VgaPico project was to have some sort of "drop in" video chip for homebrew computers. I always wanted it to lean towards the TMS9918 as that is a passion project of mine (https://github.com/cbmeeks/TMS9918).

Once I learned about the Pico and saw what it could do, I was convinced it's what I wanted to use. FPGA is just too hard for me and other micro-controllers seem to have too many hurdles (at least for me).

Thanks!

I will be watching this very closely.

_________________
Cat; the other white meat.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 66 posts ]  Go to page 1, 2, 3, 4, 5  Next

All times are UTC


Who is online

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