VIC-2000 Expander. Modern Power Using Retro Parts!

Modding and Technical Issues

Moderator: Moderators

User avatar
Radical Brad
Vic 20 Dabbler
Posts: 79
Joined: Sat Jun 24, 2017 8:18 pm
Website: http://www.lucidscience.com
Location: Gillies, Ontario, Ca
Occupation: hACKER

Re: VIC-2000 Expander. Modern Power Using Retro Parts!

Postby Radical Brad » Sun Nov 12, 2017 8:51 am

Right... so many blocks going, I am mixing up conventions.
It is IO BLock 3, starting at address 40,000 that I am mapping as IO.
I chose 40,000, as it's a nice easy number to remember.

Here is my current memory map...

Code: Select all

0000-03FF   00000-01023   System variables         BLK 0
0400-0FFF   01024-04095   3K expansion RAM area      B0   
1000-1DFF   04096-07679   User Basic area         B0   
1E00-1FFF   07680-08191   Screen memory            BLK 0
2000-3FFF   08192-16383   8K expansion RAM/ROM      BLK 1      V2K OS ROM
4000-5FFF   16384-24575   8K expansion RAM/ROM      BLK 2      V2K OS ROM
6000-7FFF   24576-32767   8K expansion RAM/ROM      BLK 3      V2K OS ROM
8000-8FFF   32768-36863   4K Character ROM         BLK 4
9000-93FF   36864-37887   I/O block 0            BLK 4
9400-95FF   37888-38399   COL RAM,BLK 1 filled      BLK 4
9600-97FF   38400-38911   Normal COLOR RAM         BLK 4
9800-9BFF   38912-39935   I/O block 2            BLK 4     
9C00-9FFF   39936-40959   I/O block 3            BLK 4      V2K IO PORT (40000+)
A000-BFFF   40960-49152   8K Expansion ROM         BLK 5      V2K OS ROM
C000-DFFF   49152-57343   8K BASIC ROM            BLK 6
E000-FFFF   57344-65535   8K Kernal ROM            BLK 7


Sorry about the bad tab alignment!
I tried to fix the text in 3 different editors, but the forum does what it wants!!

Also correct about my basic program. I meant to have the poke after the counter wrap.
Buy hey man.... I am an assembly dude, high level confuses me!
Thanks for the comments, this forum is an amazing source of VIC expertise!
Imagine if we had this kind of community "back in the day".

I have a few hours today, so I am going to lay down the other 18 required 74HC138 demuxes.
My IO system requires a "one cold" out of 128 possible lines.
In other words, I will have 128 IO wires, and only one will be low at a time for one VIC cycle.

The address is split into nibbles, each half controlling one of two master 138s.
One master will be dedicated to Video Commands, and the other to Sound Commands.
Each of these masters then selects one of 8 other 138s.

So the Video Board has 64 IO lines, and so does the Sound Board.
If for some reason, I run low on IO lines, I can double up each master to get 128 lines per master.

I also plan to use IO Block-2 as for input.
The decode line will directly drive the OE of a 74HC574 acting as a "Data Accumulator".
Since external SRAM reading is too slow for a live bus turnaround and read, this will work better.
I will explain this much later. It will be based on work I did on my 6502 powered Vulcan-74 project.

I will demonstrate the 74HC138 IO output working soon, with 64 LEDs controlled by the VIC.
Since my test code will be getting longer, I am also going to dig out my 1541 drive.

Radical Brad

User avatar
Mike
Herr VC
Posts: 3000
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: VIC-2000 Expander. Modern Power Using Retro Parts!

Postby Mike » Sun Nov 12, 2017 10:47 am

Brad, it's still not IO "BLock" 3 - just I/O 3. No use in inventing new names for old things - this only leads to confusion.

The BLocK signals refer to the VIC-20 schematics as they are produced by the '138 UC5 and which select all eight 8 KB ranges as seen by the CPU. BLK0 accesses (mainly) the internal RAM and is further refined by UC4 into RAM0..7 (of which RAM1..3 also end up at the cartridge port), BLK4 accesses the character ROM and I/O and is further refined by UC6 into four 1K address ranges: I/O 0 (the two VIAs, VIC makes its own /CS from the VA address bus), I/O 1 (colour RAM) - and I/O 2 and I/O 3 end up at the cartridge port. BLK6 and BLK7 access BASIC and KERNAL ROM, respectively. And, finally, BLK1..3 and BLK5 are also routed to the cartridge port.

A 13-port NAND (UA1 in the original mainboard, UD9 in the CR variant) blocks the data bus buffer during Phi2=0 (VIC is active) and whenever the CPU accesses something that's not on the VIC side of the address bus.

Sorry about the bad tab alignment!

There's only one right answer to this: don't use tabs. They only make trouble. :wink:

I am an assembly dude

:lol: Sorry to say that, but this vanity name got assigned to me years ago ... :P

User avatar
Radical Brad
Vic 20 Dabbler
Posts: 79
Joined: Sat Jun 24, 2017 8:18 pm
Website: http://www.lucidscience.com
Location: Gillies, Ontario, Ca
Occupation: hACKER

Re: VIC-2000 Expander. Modern Power Using Retro Parts!

Postby Radical Brad » Sun Nov 12, 2017 11:28 am

Ok thanks, from now on I shall call it IO2 and IO3.

Just did a few more tests, and I have IO writes at IO3, and reads at IO2.
I am now trimming up wire to do a demux IO test.

Should be able to get onto building the VGA generator very soon.
Talk to you soon, assembly dude!

Cheers,
Brad

User avatar
Mike
Herr VC
Posts: 3000
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: VIC-2000 Expander. Modern Power Using Retro Parts!

Postby Mike » Sun Nov 12, 2017 12:07 pm

Radical Brad wrote:Should be able to get onto building the VGA generator very soon.

As soon as you've settled upon a given screen dimension (width x height), memory layout and pixel definition (direct to DAC or palette), just call out for a converter. When you aim to improve upon my VFLI images, I want my share at this. :mrgreen:

User avatar
Radical Brad
Vic 20 Dabbler
Posts: 79
Joined: Sat Jun 24, 2017 8:18 pm
Website: http://www.lucidscience.com
Location: Gillies, Ontario, Ca
Occupation: hACKER

Re: VIC-2000 Expander. Modern Power Using Retro Parts!

Postby Radical Brad » Sun Nov 12, 2017 2:54 pm

I have indeed settled on the video specifications and timing.
Here is the plan...

Code: Select all

Screen Resolution : 400 x 300
Color Depth : 4096 simultaneous colors
Color Space : 4 Bits Red, 4 Bits Green, 4 Bits Blue
Text Resolution : 44 x 32 characters
Character Set : From VIC-20 ROM


Video Memory will be as follows...

Code: Select all

Video Buffer A : 120K x 16 Bits
Video Buffer B : 120K x 16 Bits
Graphic Memory : 8MB x 16 Bits
Master Pixel Clock : 20 MHz


I am aiming for a blitter speed of 10 Mhz, which should be capable of drawing over 300 sprites (bobs) of 32 x 32 size at 60 frames per second.
Sprites are fully alpha aware, and will be displayed using the full 4096 color palette. Alpha color is built in to hardware.
Bitmaps will have no size limit, so a screen of 4096 x 2048 could be generated and scrolled around smoothly (giant playfield).

The VIC-20 will not have to halt while the GPU is busy, as it will generate a "Ready" flag that can be checked.
So the VIC could ask for a huge sprite to be drawn, and then move on to setting up some 4 channel sound samples.

I have decided that there will be no other processor in the entire system, just the original VIC-20 6502.
Every one of the 400+ ICs I will probably need can only be simple SRAM or 1980's era logic gates (AND, OR, Buffers, etc).

It's going to be fun seeing my 1981 VIC-20 doing magic using only parts that were available when it was released.

I am now back in my cold basement lab, and putting in wires to the new sting of 74HC138 decoders.
If all goes well, I will have some blinking LEDs to show off again.

Later.
Radical Brad

sjgray
Vic 20 Hobbyist
Posts: 104
Joined: Thu May 03, 2007 6:46 pm
Location: Markham, ON, Canada

Re: VIC-2000 Expander. Modern Power Using Retro Parts!

Postby sjgray » Mon Nov 13, 2017 11:25 am

Hey Brad,

Have you considered demonstrating your stuff at a show? World of Commodore is coming up in December, in Toronto, and there are lots of Denial members coming to the show. I reserved two tables, but now it looks like I may not be able to use one. I bet people would like to see your stuff in person!

Steve

User avatar
Radical Brad
Vic 20 Dabbler
Posts: 79
Joined: Sat Jun 24, 2017 8:18 pm
Website: http://www.lucidscience.com
Location: Gillies, Ontario, Ca
Occupation: hACKER

Re: VIC-2000 Expander. Modern Power Using Retro Parts!

Postby Radical Brad » Mon Nov 13, 2017 1:27 pm

That would be a blast for sure!

This year is out, but by next year this project should be complete and ready to show.
I plan on leaving the original breadboard together when I make the "solid state" version.
The final version will be hand wired, dead-bug style over hand made copper bus wires.

It's a two day drive for me, but would be worth it for sure.
I will consider getting there in 2018 to be one of the goals for this project!

Thanks for the invite.
Brad


sjgray wrote:Hey Brad,
Have you considered demonstrating your stuff at a show? World of Commodore is coming up in December, in Toronto, and there are lots of Denial members coming to the show. I reserved two tables, but now it looks like I may not be able to use one. I bet people would like to see your stuff in person!
Steve

User avatar
Radical Brad
Vic 20 Dabbler
Posts: 79
Joined: Sat Jun 24, 2017 8:18 pm
Website: http://www.lucidscience.com
Location: Gillies, Ontario, Ca
Occupation: hACKER

Re: VIC-2000 Expander. Modern Power Using Retro Parts!

Postby Radical Brad » Mon Nov 13, 2017 2:29 pm

So far, the "One Low of 128" IO decoding system seems to work.
I still have a few hundred wires to cut, strip, and connect though.

I can actually expand this to 256 IO lines if I run out of lines.
The Video Board will nedd about 80 IO lines, and 40 or so for the Sound Board.

All decoding is done by latching the Data Bus and Low Address when IO3 is low...

Image

The dual 74HC138s on the left (A0-A4) select one of the other 16 decoders (A5-A7).
At any one time, only a single output of all 128 lines can be low.
My board will only use low logic, so this works well.

Here is the entire IO decode logic...

Image

When I have time, I will be publishing proper schematics.
... and by that I mean hand drawn, they way they were made to be in 1980!

Later,
Radical Brad

sjgray
Vic 20 Hobbyist
Posts: 104
Joined: Thu May 03, 2007 6:46 pm
Location: Markham, ON, Canada

Re: VIC-2000 Expander. Modern Power Using Retro Parts!

Postby sjgray » Mon Nov 13, 2017 3:33 pm

Brad,

I have a project to generate 256 colours on the PET. While looking into DACs I saw this on your page:
http://www.lucidscience.com/projects/VG ... ator/3.jpg

I wonder why you use 6 resistors and 6 diodes for Intensity. Could you not just use 2 resistors joined, then split into 3 with a diode on each R,G,B line?

Steve

User avatar
Radical Brad
Vic 20 Dabbler
Posts: 79
Joined: Sat Jun 24, 2017 8:18 pm
Website: http://www.lucidscience.com
Location: Gillies, Ontario, Ca
Occupation: hACKER

Re: VIC-2000 Expander. Modern Power Using Retro Parts!

Postby Radical Brad » Mon Nov 13, 2017 4:10 pm

Absolutely that works.
Most of the info on my site is over a decade old, and I plan to redo it all one day.
I use RRR-GGG-BB for all my 8 bit DACs now as well.

Brad

sjgray wrote:Brad,
I have a project to generate 256 colours on the PET. While looking into DACs I saw this on your page:
http://www.lucidscience.com/projects/VG ... ator/3.jpg

I wonder why you use 6 resistors and 6 diodes for Intensity. Could you not just use 2 resistors joined, then split into 3 with a diode on each R,G,B line?
Steve

User avatar
Radical Brad
Vic 20 Dabbler
Posts: 79
Joined: Sat Jun 24, 2017 8:18 pm
Website: http://www.lucidscience.com
Location: Gillies, Ontario, Ca
Occupation: hACKER

Re: VIC-2000 Expander. Modern Power Using Retro Parts!

Postby Radical Brad » Mon Nov 13, 2017 4:14 pm

To explain the strange 74HC138 decoding I posted, I should also mention that each of the outputs from the decoders (128 lines) will control the latching signal on a 74HC574 data latch connected to the 8 bit Data Bus.

An example of 8 of the 128 IO lines would be...

- Sprite Source Location X.LO
- Sprite Source Location X.HI
- Sprite Source Location Y.LO
- Sprite Source Location Y.HI
- Sprite Destination Location X.LO
- Sprite Destination Location X.HI
- Sprite Destination Location Y.LO
- Sprite Destination Location Y.HI

This would set a "copy and paste" segment of graphics memory from the 8MB segment to the inactive screen buffer (backbuffer).

Brad

User avatar
Radical Brad
Vic 20 Dabbler
Posts: 79
Joined: Sat Jun 24, 2017 8:18 pm
Website: http://www.lucidscience.com
Location: Gillies, Ontario, Ca
Occupation: hACKER

Re: VIC-2000 Expander. Modern Power Using Retro Parts!

Postby Radical Brad » Mon Nov 13, 2017 8:58 pm

No lab time tonight, but did get some ideas scribbled down on paper...

Image

This will be the programmable Sync / Frame Generator.
The VIC-20 will be in charge of programming the memory that drives all of the signals required to creae a proper 800x600 VGA frame as well as the signals that wrap, reset, and sync the counters and blanking signals.

Once the VIC fires up the SyncGen, it takes over and begins generating video.
The VIC only has to program the SyncGen once, right after power up.

Custom video modes will be possible.

I plan on building this circuit on the breadboard next.

Later,
Radical Brad

User avatar
Radical Brad
Vic 20 Dabbler
Posts: 79
Joined: Sat Jun 24, 2017 8:18 pm
Website: http://www.lucidscience.com
Location: Gillies, Ontario, Ca
Occupation: hACKER

Re: VIC-2000 Expander. Modern Power Using Retro Parts!

Postby Radical Brad » Tue Nov 14, 2017 8:20 am

My board layout of the IO decode circuit looks just like the schematic...

Image

There are only two 74HC574 latches connected so I can test using 16 LEDs.
I will also be testing the reading of latches using the other address block (IO2).

I know a MOS or WDC 6522 could be used to reduce the chip count somewhat, but I am not allowing myself to use "complex" components. All ICs must be either simple SRAM or basic logic gates. Besides, where is the fun in that?

Now I nee more wires... lotsa wires!

Brad

cobracon
Vic 20 Drifter
Posts: 29
Joined: Thu Nov 11, 2010 5:46 pm

Re: VIC-2000 Expander. Modern Power Using Retro Parts!

Postby cobracon » Tue Nov 14, 2017 12:20 pm

Are you going to create a pcb of this project when you are done? I'm sure a few others here would love to build what you are doing.

User avatar
Radical Brad
Vic 20 Dabbler
Posts: 79
Joined: Sat Jun 24, 2017 8:18 pm
Website: http://www.lucidscience.com
Location: Gillies, Ontario, Ca
Occupation: hACKER

Re: VIC-2000 Expander. Modern Power Using Retro Parts!

Postby Radical Brad » Tue Nov 14, 2017 1:49 pm

Yes, I am planning a "Final Version", but it may not be the kind of PCB you are thinking of!
I intend to mount the two massive boards in backlit glass front cases (one for the Sound System, and one for the Video System).
The cabinets will live on each side of the monitor, and beside the VIC-20.
It would be a shame not to show off the guts, so everything will be nicely lit with LEDs behind the glass.

Now when I say "PCB", I mean something completely off the wall, and hand made.
Have a look at these test renders...

Image

Image

What I intend to do is strip the insulation from many feet of copper house wiring and carefully straighten it.
I will then solder these copper lines into VCC and GND matrices so I can solder my ICs.
Signal wiring will then be hand done, point to point between IC pins.
This copper matrix will reduce ground bounce probably as good as a real PCB.

This will essentially be a hybrid mix of "Wire Wrap" and "dead Bug" construction.
I think I will call it... Dead Wrap!

Did I mention that I am not here to do things "The Easy Way"??!

Brad

cobracon wrote:Are you going to create a pcb of this project when you are done? I'm sure a few others here would love to build what you are doing.


Return to “Hardware and Tech”

Who is online

Users browsing this forum: No registered users and 3 guests