6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Mon May 20, 2024 11:52 pm

All times are UTC




Post new topic Reply to topic  [ 21 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Sun Jul 09, 2023 7:27 am 
Offline
User avatar

Joined: Tue Feb 28, 2023 11:39 pm
Posts: 149
Location: Texas
drogon wrote:
...
The TI99 chip was probably the first one in the home computer department that offloaded graphics completely, (separate video RAM) but other systems at the same time were building hardware to do graphics assist with RAM the CPU could pixel-poke...
...


This is effectively the route that the SNES takes. The 65816 doesn't directly access the video RAM; it first has to load graphics from ROM to the Work RAM and setup a DMA transfer that happens during vertical or horizontal blanking periods to transfer those graphics over to the 64KB video RAM. All that data must ultimately pass through the first of the two Pixel Processing Unit chips. The PPUs then work with that data over a 16 bit data bus to work their magic onto the screen. Most of what the CPU in the SNES would do would be to feed instructions to the PPUs to move the sprites, do screen effects, and other things, but it was actually several large title maps and some sprites intermixed.

The NES looks like it used a similar approach; though IIRC several NES carts employed a lot of clever bank switching to get around the 64K limit and the limited amount of RAM in the base NES console.


Top
 Profile  
Reply with quote  
PostPosted: Sun Jul 09, 2023 10:52 am 
Offline
User avatar

Joined: Fri Feb 17, 2023 11:59 pm
Posts: 163
Location: Lviv, Ukraine
BigEd wrote:
For me, modularity and encapsulation are useful ideas here: a video chip is a particular fixed function, which happens to be quite complex and which happens to have been available back in the day. For me personally, any kind of subassembly which does the job of a video chip, and only that job, is a reasonable substitution, especially if it allows for the project as a whole to be finished sooner, or more easily.

Many projects use a USB adapter chip of some kind, without worrying too much that it has a CPU system inside. It's encapsulated and dedicated. So, for me personally, using a programmed FPGA board, or a programmed microcontroller, for some specific subsystem, is almost always a reasonable thing to do.


cjs wrote:
Given that, there's an argument to be made that you should have no issue with using a CPLD or an FPGA: those are effectively the modern hobbyist equivalent of the ASICs that commercial designers could call upon to be built for them if they had sufficient financial resources to do so. Effectively, you're just taking on the job of the MOS chip designers who were working for Commodore, as well as the system designers using those chips. Alternatively, you can go the route of programming an FPGA with someone else's design such as a TMS9118 clone, which is the modern equivalent of ordering a TMS9118 from TI.


fachat wrote:
For my MicroPET I decided to optimize for space, so I used 8bit video bus, separate from main memory (video has prio) run at 12.5 MHz, for a VGA output of 640x480 (400 actually used). For B/W I need two video reads per 8 pixels - one videobdata and one for char 'ROM' if in character mode. 25MHz pixel clock means two pixels per memory access or four memory accesses per 8 pixels. So half the memory bandwith is CPU the other half is Video.
Adding colour means reading an additional byte of color (in this case per 8x8 pixel cell), so only 1/4 of memory bandwith available for the CPU.


Thanks for sharing your insights folks - I'm learning a lot from your experience.

I'm starting to realize that with my current skill level I should put my "purist" ambitions on hold and try doing some simple FPGA work first that will have its own VRAM, accept instructions from 6502 through several memory-mapped registers, and do some composite video rendering.

And most importantly - soft-core approach will be faster in my case, so time-to-completion will be lower than going for a hardware-only solution (not counting the old stock chips, of course, which would be the fastest).

cjs wrote:
Effectively, you're just taking on the job of the MOS chip designers who were working for Commodore, as well as the system designers using those chips.


Thinking about this, it actually sounds really exciting & encouraging!

sburrow wrote:
Doing some simple math, 320x240 with 8-bit color = 76800 bytes of memory. That's if you don't overscan or anything else. Typical expected memory on a simplified level would be 128K, just for video, yet the 6502 can only officially access 64K. If you have a 6502 running at 1 MHz for low end users, or even something around 4 MHz let's say, and updating each pixel on the screen takes at minimum LDA/STA statements, you are looking at a LOT of time to update a single screen. Imagine running this thing at 60 FPS!


As Yuri said, it may be mitigated by offloading most of poking logic onto the video chip and having it maintain its own VRAM. But yes, having 6502 poke every pixel would be unrealistic.

TL;DR: I'm going to play with my MachXO2 and see what it can do. It's going to be more effective than trying to chase unrealistic "purist" goals, at least for now.

_________________
/Andrew

deck65 - 6502 slab with screen and keyboard | ПК-88 - SBC based on KM1810VM88 (Ukrainian i8088 clone) | leo80 - simple Z80 SBC
nice65 - 6502 assembly linter | My parts, footprints & 3D models for KiCad/FreeCAD


Top
 Profile  
Reply with quote  
PostPosted: Sun Jul 09, 2023 11:19 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10802
Location: England
I think it's great that we're in a position these days to make our own custom chips (in effect)! There is a learning curve, but the tools are free, including simulators. Good luck on your journey!


Top
 Profile  
Reply with quote  
PostPosted: Sun Jul 09, 2023 12:20 pm 
Offline
User avatar

Joined: Fri Feb 17, 2023 11:59 pm
Posts: 163
Location: Lviv, Ukraine
BigEd wrote:
I think it's great that we're in a position these days to make our own custom chips (in effect)! There is a learning curve, but the tools are free, including simulators. Good luck on your journey!


That's true. Thanks! I was pleasantly surprised that there are a lot of nice open source toolchains for Linux. (When I did some hardware stuff back in high school, finding a free non-proprietary software was an utter pain.)

Just picked up my tiny new board. It nicely fits into DIP-20 socket:
Attachment:
photo_2023-07-09_15-19-33.jpg
photo_2023-07-09_15-19-33.jpg [ 186.85 KiB | Viewed 260 times ]

Attachment:
photo_2023-07-09_15-19-41.jpg
photo_2023-07-09_15-19-41.jpg [ 274.74 KiB | Viewed 260 times ]

_________________
/Andrew

deck65 - 6502 slab with screen and keyboard | ПК-88 - SBC based on KM1810VM88 (Ukrainian i8088 clone) | leo80 - simple Z80 SBC
nice65 - 6502 assembly linter | My parts, footprints & 3D models for KiCad/FreeCAD


Top
 Profile  
Reply with quote  
PostPosted: Sun Jul 09, 2023 7:56 pm 
Offline
User avatar

Joined: Sat Dec 01, 2018 1:53 pm
Posts: 727
Location: Tokyo, Japan
and3rson wrote:
But yes, having 6502 poke every pixel would be unrealistic.

It's perfectly realistic; this is exactly what the FM-8 (1981) and FM-7 (1982) did, albeit with a 6809.

The only thing is that you have to make sure that it's another 6502, not the one you're using as your main CPU. :-)

_________________
Curt J. Sampson - github.com/0cjs


Top
 Profile  
Reply with quote  
PostPosted: Sun Jul 09, 2023 8:07 pm 
Offline
User avatar

Joined: Fri Aug 03, 2018 8:52 am
Posts: 746
Location: Germany
also if all you do is draw single frames of graphics, or display text, poking each pixel seperately by the CPU is fast enough to be usable.
scrolling would be a bit painful though.

only when you start to do anything more interactive than a text based command line (like drawing GUIs or making games) do you need some form of hardware acceleration to speed up drawing and/or copying.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 21 posts ]  Go to page Previous  1, 2

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 8 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: