Greets CB, I enjoy seeing your projects as well. I find your posts all over the retro-hood when I wander.
The goals for this project are the same as for my other project "VIC-2000".
Here is the short version...
- To use my VIC-20 once again as my main computer.
- To code 6502 assembly demos and "revamp" some old VIC classic games.
- Dual displays, with all dev /coding done on the VIC screen, and results on the VGA screen.
- No other processors. The original 6502 in the VIC will have to do everything.
- The VIC-20 must remain 100% original. Only the Expansion Port may be used.
Basically, the FPGA is just a Multimedia Expansion Cartridge.
It can only do what the VIC tells it to do.
The VIC will get a new Operating System (booting as a cartridge).
The new OS will contain an IDE, assembler and many utilities such as a graphics editor, music editor, 6502 assembly reference, and a new File System to deal with 4GB external storage.
All demos and games will be completely created and assembled on the VIC using the original NTSC display. The second VGA display is only active when a program is assembled and running. At this time, the VIC will simply call the GPU / SPU using memory mapped commands at IO2.
So far, here are all of the commands (by type) that I have coded into the FPGA.
I will expand on what these all do soon, but they are fairly obvious...
Code: Select all
// MATH
parameter WCOM_MATHALO = 000;
parameter WCOM_MATHAHI = 001;
parameter WCOM_MATHBLO = 002;
parameter WCOM_MATHBHI = 003;
parameter WCOM_MATHADD = 004;
parameter WCOM_MATHSUB = 005;
parameter WCOM_MATHMUL = 006;
parameter WCOM_MATHDIV = 007;
parameter WCOM_MATHSIN = 008;
parameter RCOM_MATHR1 = 009;
parameter RCOM_MATHR2 = 010;
parameter RCOM_MATHR3 = 011;
parameter RCOM_MATHR4 = 012;
// MEMORY
parameter WCOM_DATADRLO = 020;
parameter WCOM_DATADRMD = 021;
parameter WCOM_DATADRHI = 022;
parameter WCOM_STRIDELO = 023;
parameter WCOM_STRIDEMD = 024;
parameter WCOM_STRIDEHI = 025;
parameter WCOM_DATAREAD = 026;
parameter WCOM_DATAWRITE = 027;
// GRAPHICS
parameter RCOM_SYSREG = 050;
parameter WCOM_FLIP = 051;
parameter WCOM_CLEAR = 052;
parameter WCOM_LOCX1LO = 053;
parameter WCOM_LOCX1HI = 054;
parameter WCOM_LOCX2LO = 055;
parameter WCOM_LOCX2HI = 056;
parameter WCOM_LOCY1LO = 057;
parameter WCOM_LOCY1HI = 058;
parameter WCOM_LOCY2LO = 059;
parameter WCOM_LOCY2HI = 060;
parameter WCOM_PXLREAD = 061;
parameter WCOM_PXLWRITE = 062;
parameter WCOM_SPRITE = 063;
parameter WCOM_PALIDX = 064;
parameter WCOM_PALRED = 065;
parameter WCOM_PALGRN = 066;
parameter WCOM_PALBLU = 067;
parameter WCOM_CHAR = 068;
// SOUND
parameter WCOM_VOXIDX = 100;
parameter WCOM_VOLUME = 101;
parameter WCOM_FREQLO = 102;
parameter WCOM_FREQHI = 103;
parameter WCOM_VOXADRLO = 104;
parameter WCOM_VOXADRMD = 105;
parameter WCOM_VOXADRHI = 106;
parameter WCOM_VOXLENLO = 107;
parameter WCOM_VOXLENMD = 108;
parameter WCOM_VOXLENHI = 109;
parameter WCOM_PLAY = 110;
The number after the command name is the offset from memory location 38912 (IO2).
All command either accept or send back an 8 bit value.
The GPU has 4 Megabytes of 10ns SRAM, and can move alpha aware images (Sprites) from one area of memory to another at 20MHz bandwidth. Since the VIC-20 CPU has do do all of the work, it's a good thing that the blitter subsystem is fast!
Sprites can be any size up to 2048 x 2048 pixels, and have 256 colors.
The GPU displays 256 colors, with a programmable palette of 32,768 colors.
Sound is 4 independent sample channels, mixed into stereo with 2 channels per side, just like the Amiga. Samples are stored in the Multimedia memory just like the Sprites and Bitmaps.
The VIC tells the SPU where a sample starts, where it ends, how load it is, what frequency to play it at, and how many times to loop. I may also add some effects if I have room.
The VIC-20 can make use of the VGER-20 in assembly or even basic, since it is just an area of 256 bytes mapped at location 38912. I will probably test all the above commands this weekend by just poking around in un-expanded basic!
So my VIC-20 is definitely not going to be on the sidelines, it's just getting a new appendage.
The VIC is the best 8 Bit computer ever made, and soon it will become the most powerful as well!
On a side note, I guess this hardware could work on any 8 bit computer that can map 256 bytes to some external location.
Cheers!
Radical Brad
cbmeeks wrote:This looks like an interesting project but I'm curious as to what the main objective is. Will this be for running a separate VGA monitor in addition to the CRT VIC-20?
Is it to enhance the VIC-20 or is the VIC-20 going to be off to the sidelines?
Thanks