6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Tue Sep 24, 2024 5:20 am

All times are UTC




Post new topic Reply to topic  [ 122 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7 ... 9  Next
Author Message
PostPosted: Thu Oct 11, 2018 5:22 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10938
Location: England
That's two homebrew TTL systems running a TCP/IP stack - very impressive!


Top
 Profile  
Reply with quote  
PostPosted: Thu Oct 11, 2018 6:12 pm 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 642
Location: Gillies, Ontario, Canada
Had that one in my boockmarks for a while as well.
What an amzing looking bit of work... inside and out!

Brad

BigEd wrote:
See also Magic-1


Top
 Profile  
Reply with quote  
PostPosted: Thu Oct 11, 2018 6:40 pm 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 642
Location: Gillies, Ontario, Canada
Did a little more work on the switching part of the schematic.

Image
This small segment of JetPack is a Dual Frame Switcher.

Here is a PDF version that is actually readable (use 400% zoom)...
http://www.lucidscience.com/temp/JetPack%20Schematic%20-%20OCT%2011%202018.pdf

This is just a small part of JetPack, and is responsible for Double Buffering the Media Memories.
The switcher also mixes 2 other memories in real-time with Frame Instruction Memory and Frame Control Memory.

Altogether, there are 4 different memory types being used here, some with independent busses...

1) Kernal Boot Memory runs only once, and just sets up the VIC as required by JetPack.
2) Frame Instruction Memory contains executable instructions for the 6502 inside the VIC-20.
3) Frame Control Memory is a microcode memory that helps conduct the flow of the multiple data streams.
4) Multimedia Memory contains actual pixel data and sound voice data, and is raster synced.

When the VIC-20 accesses the Media Memory, it sees it as 23 columns of 176 bytes (4048 Bytes).
When the GPU writes to this memory, it is done as a 92 * 176 Bitmap with 2 Bit Color (4048 Bytes).

Media Memory is mixed with Frame Instruction Memory in realtime, so VIC sees it as a 5 byte block.
This mixed 5 step memory becomes 24K spanning Blocks 1,2,3...

Code:
INS      VAL         STEP      MEMORY
---------------------------------------------
LDA      169         1         FRAME.MEM
VAL      DATA.8      2         MEDIA.MEM
STA      141         3         FRAME.MEM
VAL      ADR.LO      4         FRAME.MEM
VAL      ADR.HI      5         FRAME.MEM


The reason for this Bit Conversion is so that the Programmer only has to think of the screen as X * Y.
The VIC-20 bitmap screen is rather complex to the programmer, and also requires a read to write single bits.
The JetPack GPU hides all of this, and makes it easy to draw graphics at blazing speed.

Here are some other specs of interest...

Code:
[GRAPHICS]
- 184 x 176 (23 x 11 dual height) frame draw at 30 fps loop
- GFX systems work at 92 x 176 x 2 bit Bitmapped mode
- Frame draw builds instructions + gfx data from sram
- Frame buffer SRAM is 4 SRAMs wide, using only 2 bits per SRAM
- GPU r/w access to SRAM is 92 x 176 x 2 bits, using individual SRAMs
- VIC read access to SRAM is 23 x 176 x 8(2x4) bits, using 4 SRAMs at once
- 4 colors : 0 = screen / 1 = border / 2 = character / 3 = auxiliary
- 4 color values can be changed on every line
- All 4 sound voices + volume updated on every frame
- Joystick and last 4 keys pressed read on every frame

[FRAME]
- 65 cycles per line x 261 lines = 16,965 cycles per frame
- 30 fps frame catch up mode = 33,930 total cycles per frame
- 6502 instruction clock = 1.022727 MHz
- 6560 pixel clock = 4.090909 MHz


You can also see that there are two complete Media Memories, and these are swapped on the vertical blanking.
In the Schematic, I have not yet connected the second Memory, but you can still see that it is a mirror image.

The actual GPU and Sprite Generator will be the largest part of the schematic, but I want to build this section first.
The MOAB will soon begin to look like a city of ceramic again!

Cheers!
Radical Brad


Top
 Profile  
Reply with quote  
PostPosted: Fri Oct 12, 2018 6:01 am 
Offline
User avatar

Joined: Fri Nov 09, 2012 5:54 pm
Posts: 1429
Your project develops nice so far, looking forward to seeing the GPU concept.

Oneironaut wrote:
That would be a fun project.
It would be a challenge to do any better than Dennis Kuschel's MyCPU project...

From the specifications, MyCPU can run at 10MHz max., and one machine cycle is three clock cycles.

Drass still is working on that 6502 compatible TTL CPU.
We have proof it makes 20MHz when not using the NMOS 6502 "illegal" instructions, and one machine cycle is one clock cycle.
That's 6 times faster than a 10MHz MyCPU, and there already are TCP\IP stacks for the 6502.

Still some little incompatibilities with NMOS 6502 RMW cycles when running C64 software, but we think this can be fixed.
After this is fixed, extending the address bus to 24 Bit would be next.

;---

TTL CPU running at ca. 1MHz while plugged into a VIC-20:

Image

Image

Image

BTW: Drass would be interested to pay you a visit later for finding out if the TTL CPU works with your project. :)
He happens to live in Canada, too.


Top
 Profile  
Reply with quote  
PostPosted: Fri Oct 12, 2018 2:32 pm 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 642
Location: Gillies, Ontario, Canada
Thanks!

Yes, that would be very cool for sure.
If things work as expected, I should have my VIC-20 doing Amiga Boing (with multiple balls, of course!), and a giant scrolling background very soon.

As long as the TTL 6502 does not violate the 65 instructions per raster line expectation of the 6560, then it should work.
JetPack timing is tightly coupled to the number of instructions per line and frame.

I am going to explain this in much more detail later, but the general explanation goes like this...

VIC wait for the start of a new frame, held in a tight loop until the first raster line.
Vic then waits for a few more lines so the 6560 begins to draw just ahead of the program counter.
At that point, a jump to the 24K contiguous memory segment from 8192-32767 is made.
That memory is "virtual", created on the fly based on instructions and expected image / sound data.

The virtual "Frame" is read as 1 double height character row (368 Bytes) and 23 color changes (23 Bytes).
This sequence is continues for 11 rows of double height characters, which is a column of 176 bytes.
By the time the entire frame is drawn, the 6560 has displayed 2 frames of the same data.
The screen changes never cross the raster beam, so there is no shearing or flicker.
Basically, the 6560 raster is just behind the JetPack Frame, which lasts for 2 full frames.
This redraw is capable of 30 frames per second without any shear or raster tearing.

The Virtual Frame Memory is also double buffered and expanded as a full 92 x 176 color frame.
This means the game logic has an easy job of drawing, while JetPack does all of the heavy lifting.
The Sprite Generator will also work on the "Back Buffer", so the programmer need not worry about timing.

A game like Turrican will be no problem whatsoever for a VIC-20 running JetPack!
With the 16MB of Media Memory, tiles won't even be required... just draw a massive bitmap background!

Brad


ttlworks wrote:
Your project develops nice so far, looking forward to seeing the GPU concept.

BTW: Drass would be interested to pay you a visit later for finding out if the TTL CPU works with your project. :)
He happens to live in Canada, too.


Top
 Profile  
Reply with quote  
PostPosted: Sat Oct 13, 2018 12:52 am 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
Re: a diode-matrix ROM...
Oneironaut wrote:
1N914's feeding 74HC245s as rows with 74HC138's energizing columns.
There will be six 138's generating 32 columns of 8 bytes, for a total Boot Code of 256 bytes.

Hi, Brad! The part about six 138's threw me at first, but probably you mean there'd be two auxiliary 138's (shown in color below) which don't directly attach to the array. Diode ROM's are fun to design! :) My diagram omits the actual diodes, but of course they'd appear as needed at various row-column junctions.
Attachment:
diode ROM Plan 'A'.png
diode ROM Plan 'A'.png [ 7.27 KiB | Viewed 3564 times ]
I guess you realize the auxiliary '138 on top could be replaced by half a '139... or even just a single inverter section if you exploit the active-high and active-low enable inputs on the column 138's. But replacing one chip with 1/2 or even 1/6 of a chip admittedly isn't that big a win. Depending on layout and other issues it might be simpler just to stick with the '138.

Some other ideas may be more profitable. For example, the eight 245's are in effect doing a multiplexer function, and actual 1-of-8 multiplexers might be a better option. Eight 74hc251's (one to drive each of the data-bus lines) could replace the eight 245's, and they'd need no '138 to drive them (the 3-bit select input is decoded internally). Besides eliminating the 138, 251's are smaller than 245's -- 16 pins, vs 20.

After that there's a simpler change that's worth consideration. Those eight 251's (1-of-8 multiplexers) could be replaced by eight 74hc4051's. This is a 1-of-8 analog switch (ie, 8PST) using CMOS transmission-gates -- a decades-old re-issue of the even more ancient 4051. Using the transmission-gate switches you could reduce the number of pullup resistors by 56. :P Instead of having 64 pullups (one on each row line of the matrix) you could just have 8 -- one on each line of the data bus.

Edit:if the data bus can't tolerate the load of the pullup resistors then the benefit gets traded off somewhat, because you might have to insert a '245 (or whatever) as a buffer. It's that or go back to 64 resistors. That actually might not be so bad, considering that resistor arrays -- meaning the through-hole, SIP type -- don't take much space.

cheers
Jeff

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


Last edited by Dr Jefyll on Sat Oct 13, 2018 4:21 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Sat Oct 13, 2018 4:08 pm 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 642
Location: Gillies, Ontario, Canada
That was basically what I had planned for the diode ROM.
It looks like I may not be going that way though, as I have decided to keep the entire 32K external memory as one segment now.
The reason is so that I can have JetPack draw a startup logo before transferring control to the VIC to run the cartridge.
This also allows a small test program and "screen centering" routine to run on the absence of a cartridge.
My BOOT code is now almost 6K... a bit too much for a Diode ROM!

Brad

Dr Jefyll wrote:
Re: a diode-matrix ROM...


Top
 Profile  
Reply with quote  
PostPosted: Sat Oct 13, 2018 4:11 pm 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 642
Location: Gillies, Ontario, Canada
A few more ICs now in place...

Image
This is the Frame Memory and Switching Circuit.

This is the Frame Control System that contains instructions, microcode, and now the Boot ROM.
I will explain how it all works as I wire it up. I hope it actually does work!

Later,
Brad


Top
 Profile  
Reply with quote  
PostPosted: Sun Oct 14, 2018 7:56 pm 
Offline
User avatar

Joined: Sun Oct 18, 2015 11:02 pm
Posts: 428
Location: Toronto, ON
Oneironaut wrote:
Yes, that would be very cool for sure ... As long as the TTL 6502 does not violate the 65 instructions per raster line expectation of the 6560, then it should work.
Awesome ... the TTL CPU is cycle accurate, and already works with the VIC-20, so it *should* work. It would be super cool to see the two working together — and, who knows, with a 20MHz TTL CPU and your beastly TTL GPU, there is potential for a pretty powerful all-TTL computer. :shock:

It might take a while though: made some progress today but still stuck on a couple of bugs. Better keep working! :)

By the way, love the projects Brad. Thanks for sharing!

Cheers.

_________________
C74-6502 Website: https://c74project.com


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 15, 2018 1:23 am 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 642
Location: Gillies, Ontario, Canada
Thanks! I look forward to meeting up with some other 6502 hacking maniacs in the future!!
That TTL 6502 is a work of art!
One of my goals is to lug this beast to one of the gatherings like World of Commodore one day as well.

Brad

Drass wrote:
Oneironaut wrote:
Yes, that would be very cool for sure ... As long as the TTL 6502 does not violate the 65 instructions per raster line expectation of the 6560, then it should work.
Awesome ... the TTL CPU is cycle accurate, and already works with the VIC-20, so it *should* work. It would be super cool to see the two working together — and, who knows, with a 20MHz TTL CPU and your beastly TTL GPU, there is potential for a pretty powerful all-TTL computer. :shock:

It might take a while though: made some progress today but still stuck on a couple of bugs. Better keep working! :)

By the way, love the projects Brad. Thanks for sharing!

Cheers.


Last edited by Oneironaut on Mon Oct 15, 2018 1:51 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 15, 2018 1:25 am 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 642
Location: Gillies, Ontario, Canada
Fall is still being nice to me, so indoor time is a bit scarce. Did manage to wire up a few things...

Image
Address and Data Lines from Vic-20 to the Frame Switch.

I moved the 245's into a better position as well.
More to come when I have the time.

Cheers!
Brad


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 15, 2018 12:22 pm 
Offline
User avatar

Joined: Wed Aug 17, 2005 12:07 am
Posts: 1228
Location: Soddy-Daisy, TN USA
Brad,

Exactly how many MILES of wire do you have? lol

I noticed you're using a mix of CAT-5 (6?) and what looks to be normal breadboard wire (22AWG?).

I tried using CAT-5 once but found it to be too loose. Like it would fall out if I turned the breadboard upside down. But that's probably because I always bought cheapo $5 breadboards from China.

What brand do you use?

_________________
Cat; the other white meat.


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 15, 2018 4:49 pm 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 642
Location: Gillies, Ontario, Canada
I use CAT wiring exclusively. A 500 foot roll can be purchased for a decent price, and it will last for a lifetime of bread-boarding and various projects.

The wire makes a perfect connection in the breadboards I use, and have yet to ever experience a failure due to wiring (with the exception of me putting them in wrong!).

The breadboards I use are from Twin Industries...

https://www.digikey.ca/product-detail/en/twin-industries/TW-E40-1020/438-1045-ND/643111

I endorse them on my own free will, and can say that no other breadboard even comes close to the quality and durability they offer. I originally tried the $6.00 China board, and I found them to be sloppy and prone to glitches when working with digital.

I like photos, so here is a pictorial on how I use CAT-5/6 wiring for bread-boarding work.
Can't imagine using any other kind of wire!

Image
CAT 5/6 wire is normally used for computer networking.

Since I have been known to go a bit overboard on my breadboard projects, I often cut a large number of "standard" lengths ranging from .25" (VCC & GND) all the way to 16". I cut standard wires in increments of .5".

Image
Cutting various standard lengths.

To get at the internal wires, I start with a small cut in the shield.

Image
Cutting the shield to revel the wire inside.

A single cut will allow plyers to grab the wires in order to pull them free.

Image
Exposer wires ready to be pulled free.

There are four pairs of twisted wires inside.
Standard colors work well for bread-boarding; Red, Green, Blue and Brown.
Each color is twisted with a wire that is mainly white, but with a color stripe.

Image
Four twisted pairs of different colors.

To unwind the pairs, just hold them between your thumb and finger, then turn the other end of the wire until it unthreads both wires. After a few hundred wires, this will seem very easy to do.

Image
Unwinding the pairs of wires.

At this point, the wire is distorted from being twisted by the other.
To straighten out the wire, just drag it across a round surface like a pen, pressing down with your thumb as you drag it. The wire will easily straighten out.

Image
Making the bent wire straight again.

Before you can use the wire for a breadboard, the bare copper must be exposed.
I like to have slightly less than 1/4" of wire exposed, as this seems perfect.

If you expose too much wire, the sharp copper tip may reach all the way down to the ground plane, which is not good. Conversely, too little wire means an insecure contact in the breadboard.

Image
Exposing the coppper wire.

Wire is exposed to approximately 1/4" for bread-boarding work.

Image
A wire trimmed and ready for insertion.

Now the wire is ready to be inserted into the solderless breadboard.
You can never have enough wire when prototyping!

Image
Wire installed on breadboard.

So that's how I do it in my lab.
Perhaps this type of wire is the reason I am able to break the rules of bread-boarding?
I often go well over 25MHz without issue, which is against what the experts preach.

Good quality breadboards, Cat-5 wire, and a little consideration for Mr. Propagation and Miss Capacitance... that's all ya need!

Cheers!
Radical Brad


cbmeeks wrote:
Brad,

Exactly how many MILES of wire do you have? lol

I noticed you're using a mix of CAT-5 (6?) and what looks to be normal breadboard wire (22AWG?).

I tried using CAT-5 once but found it to be too loose. Like it would fall out if I turned the breadboard upside down. But that's probably because I always bought cheapo $5 breadboards from China.

What brand do you use?


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 15, 2018 5:05 pm 
Offline

Joined: Sat Dec 13, 2003 3:37 pm
Posts: 1004
cbmeeks"
Exactly how many MILES of wire do you have? lol[/quote]
[quote="Oneironaut wrote:
I use CAT wiring exclusively. A 500 foot roll can be purchased for a decent price, and it will last for a lifetime of bread-boarding and various projects.

So, 0.95 Miles, for those keeping score.

I am surprised you use a knife to strip the wire vs a dedicated stripper, considering how much you're doing.


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 15, 2018 5:12 pm 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 642
Location: Gillies, Ontario, Canada
I am a freak for doing as much as possible with the most minimal tools possible.
To prove my insanity, every single Bike or Trike on my AtomicZombie.com site was made using ONLY...

- Hand held drill.
- Hand held angle grinder.
- Cheap AC welder.
- Basic steel tube and old bike parts.

I just get huge enjoyement from the challenge of doing more with less!

The knife / thumb roll strip system is also super fast for me now.

Brad

whartung wrote:
I am surprised you use a knife to strip the wire vs a dedicated stripper, considering how much you're doing.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 122 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7 ... 9  Next

All times are UTC


Who is online

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