6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun May 12, 2024 5:47 am

All times are UTC




Post new topic Reply to topic  [ 20 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Sat Apr 08, 2023 1:56 pm 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1076
Location: Albuquerque NM USA
I'm away mess around with Z80 but recent discussions about cheap video and Chad's progress with serial VGA are quite interesting even though I've not understand the details of designs being discussed. Since W65C02 can run at 25.175MHz-VGA (in fact 36MHz-SVGA), my thought is running 6502 as fast as possible so it can do more work during vertical blanking period. 25MHz 6502 can do the work of 2MHz 6502 in the 86mS video blanking period.

Wonderful thing about CPLD is it can be modified easily to check out new design concepts, so I think I'll break out my overclock board again.
Bill

Edit, never mind using overclock board; I need to disconnect 6502's data line from RAM and hook them up to CPLD separately. overclock board is too fragile for major operation. I'll find another victim to operate on...


Top
 Profile  
Reply with quote  
PostPosted: Sat Apr 08, 2023 5:05 pm 
Offline
User avatar

Joined: Fri Sep 08, 2017 9:41 pm
Posts: 39
Location: UK Expat living in Washington State, US
Ok had a little think about this and wondered if there is a variant. Apologies if you know this stuff already but writing it down helps me think.

The two forms in the cheap video cookbook both need cpu to execute dummy 2 byte instruction, where firstly the address bus clocks a character generator ROM eg2315 where the ROM address is driven by ram- one byte for each char, and the character ROM outputs are serialized at the dot clock frequency.
The other approach is the address bus clocks ram directly and the ram data bus is serialized. This uses more memory as a frame buffer is needed with a bit for each pixel.

Dr jefyl posted an interesting abuse of 65c02 unused opcodes, which are all safe on 65c02.
viewtopic.php?f=4&t=1945

I was wondering if, instead of a frame buffer and clocking data out of ram, the fast 5bit opcode output is instead serialized. Here the cpu is not fed a dummy opcode but actually executes the 5bit opcodes. There is an efficiency loss as instead of 8bits per memory byte we now only get 5, but this is enough for a 5x7 font at the least.

It is still cloudy to me but I think this approach results in simpler hardware. Make sense? Comments?


Top
 Profile  
Reply with quote  
PostPosted: Sat Apr 08, 2023 5:37 pm 
Offline

Joined: Mon Jan 19, 2004 12:49 pm
Posts: 684
Location: Potsdam, DE
Not sure there. My approach uses lots of dummy two byte instructions (from a rom in parallel with most of the video ram) so the ram is addressed at the same address as the executing code. And as discussed earlier, it uses a *lot* of memory, for a bitmapped monochrome output - a touch under 60k.

In my context I want the freedom to be able to set/clear any pixel in the visible range, rather than be restricted to a tiny 5x7 font by the hardware.

Neil


Top
 Profile  
Reply with quote  
PostPosted: Sun Apr 09, 2023 4:09 am 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3354
Location: Ontario, Canada
VinCBR900 wrote:
[...] the fast 5bit opcode output is instead serialized. Here the cpu is not fed a dummy opcode but actually executes the 5bit opcodes. There is an efficiency loss as instead of 8bits per memory byte we now only get 5, but this is enough for a 5x7 font at the least.
Recently Chad posted much the same idea, and I salute you both for thinking of it.

I'm a little too sleepy ATM to fully consider the tradeoffs. One thing, Vince: be sure you do get a clear handle on the difference between a bit-mapped display and one that uses a Character Generator. If the 5 bits extracted from each opcode go directly to the shift reg then it's bitmapped.

But I kinda think if you want a 5x7 font then each character needs 6 pixels worth of width in order to provide a space between adjacent characters. So, would the hardware add that blank extra pixel of space? It's easily doable. Just a little weird, is all. Usually folks opt for bitmapping so they can achieve full freedom to turn on or off any pixel. (Neil mentions this in the preceding post.) But the extra pixel added by hardware would always be blank (off).

Speaking of 65C02 undefined opcodes, there's some startling potential there. :!: Not that we're obliged to use that potential, but there's definitely scope for creativity. More on the subject here.
Quote:
These quirks present remarkable opportunities for a certain segment of the 65xx community. Some of us relish the challenge of expanding the 65C02's instruction set or its 64K address range by means of simple (or perhaps quite ambitious) schemes involving external logic. There needs to be some way for your program to tell the logic when to do something special, and the 65C02's one-cycle NOPs (see columns x3, x7, xB and xF in the table) are an ideal way to encode this special meaning. They're small and fast (1-byte, 1-cycle), have a bit-pattern that (in conjunction with SYNC) makes them easy to detect in the instruction stream, and there are lots of them available (30 on a modern WDC 65C02; 32 or more on other 65C02s). It's very simple to arrange for an action to be triggered by a one-cycle NOP acting on its own. And if you throw in a shift register or some other means of counting cycles, a one-cycle NOP can act as a Prefix Byte that gives additional meaning — such as a momentary bank switch to the following instruction.

-- Jeff

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Top
 Profile  
Reply with quote  
PostPosted: Sun Apr 09, 2023 2:00 pm 
Offline
User avatar

Joined: Fri Sep 08, 2017 9:41 pm
Posts: 39
Location: UK Expat living in Washington State, US
Dr Jefyll wrote:
[…]be sure you do get a clear handle on the difference between a bit-mapped display and one that uses a Character Generator. If the 5 bits extracted from each opcode go directly to the shift reg then it's bitmapped.
But I kinda think if you want a 5x7 font then each character needs 6 pixels worth of width in order to provide a space between adjacent characters. So, would the hardware add that blank extra pixel of space?
Yes you are right, I had confused the two. However on reflection I don’t think this approach would work with an external char gen ROM as The 5bit space does not give enough bits to drive a meaningful ASCII set.

But as you mention, a design time decision could be taken for alphanumeric or graphic framebuffer, both with external serializer. For alphanumeric the shift reg would shift out an extra blank separator bit for each 5bits as you mention, and the cpu cycle (not clock) would run at a 1/6 of the dot clock, or 1/5 for framebuffer.

But I think the real value of this approach is to run the cpu cycle at the dot clock speed, but now the abused op-codes drives a 5bit ADC to get 31 gray scales (inc black) plus blanking. A back of napkin calculation for a 60hz 52us active video scan line with a 20mhz 65c02 could display 260 horizontal pixels assuming 4cycle instruction.


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

All times are UTC


Who is online

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