Menu

VHDL 6510-core / Vic64 in VHDL: Recent posts

More hardware

The work with a PS/2 keyboard was a quick thing to do. I browsed the web to find some kind of example and found one here: https://www.digikey.com/eewiki/pages/viewpage.action?pageId=28278929. After I implemented this code in my project I got some really boring warnings about a new clock - I had been kind of lazy and hadn't review the code as I should have, just thinking "well, I'll test if it works... can't go straight to the warm place, can it?". To make a long story a bit shorter - no, I didn't destroy any hardware, but eventually I did it my way and my code worked at the first try. Not so often it does so I was kind of happy with get a keyboard working in just one day. The code is ok, but the keyboard doesn't look nice now - to get all the keys from the C64 layout I had to use some tape and write new keys. But it works.... read more

Posted by Fredrik Beckman 2019-01-24

More bugs

Since I managed to implement the SDRAM controller I have been trying to debug the VIC-II and the CIA. It really helps with bigger ram buffers when running the signal analyzer. One of the problems now is that I realized that there is at least one bug in the debug process, which actually is a bit ironic. It looks like the debug interface tries to write to the memory just as the debugEnable goes low. I have to fix this somehow, but it made me see that there also are some known "features" (bugs) in the windows tool that I use for the keyboard and also download compiled programs (mostly test progs) to my FPGA.
This is both good and bad - good that I saw what bug I have but bad because I don't think I can trust my tools. So I made a new prioritization:
1. Correct the bug found in the debug interface
2. Implement a PS/2 module so I can use a dedicated keyboard.
3. Continue debugging the VIC and CIA modules.
4. The VIC module still doesn't look good. Have to simplify the code.... read more

Posted by Fredrik Beckman 2019-01-22

SDRAM

I have now created a controller and test program for the SDRAM in my project. The test program indicates success. Great! I have read a lot about SDRAM controllers during the christmas holiday and from time to time it has been a bit depressing so now when it seem to work I feel light as a feather. Really happy feeling.

The SDRAM is IS42S16320D-7 and I tried for a long time get hands on a vhdl model for it. When I failed I used one for a micron SDRAM instead, but its not true timing in it anyway, and also quite simple. But it was good enough for this implementation.... read more

Posted by Fredrik Beckman 2019-01-07

CIA tests

Lately there hasn't been so much work as I have expected, at least not much results. I downloaded the vice test suite which is... huge. Anyway I started with the CIA TOD tests and found out there were some bugs. I have now corrected these, but it still looks like I have some issues there. When running some tests for the timer A and B there are some issues too. I really thought that the CIA was pretty much done but at least it works good enough to run something on my vic64 implementation.
I think that there are probably some mismatch with the frequencies - PAL/NTSC in the VIC2 module and this 1MHz (or more exactly 0.98MHz/1.02MHz) stuff. Probably my shortcut to run at exactly 1MHz isn't that well thought through.... read more

Posted by Fredrik Beckman 2018-12-12

Game tests

I have now tested some games, not so many working yet, but at least Attack of the Mutant Camels is playable and also probably Galactic empire. For now only PRG files are possible to download wich make the games list quite short. These I have tested:
- 10'TH FRAME_GAP; doesn't start
- 1942V1_MHI; not possible to start game, graphics ok though
- 1942V2_MHI; rolling graphics at start
- 1943V1_MHI; Bugs at smooth scroll. Seems like YSCROLL needs an update
Also looks like it restarts over and over.
- 1944_MHI; Jams at start...
- 1985_MHI; Starts ok but not possible w/o joystick
- 1994_10yr_after_vision_mhi; Actually possible to play...
- 4by4.F4CG; Jams after start screen
- AMC; Playable
- BOMB JACK II++; Jams
- BOMBJACK+TAC; Jams
- DAREDEVIL DENNIS; Starts ok but not possible w/o joystick
- GALACTIC EMPIRE; Works
- HARRIER ATTACK; Works in some way, but not possible w/o joystick(?)
- HOBGOBLIN; Jams
- Pac-man; not possible w/o joystick(?)... read more

Posted by Fredrik Beckman 2018-11-13

VIC-II: Sprites and stuff

I have now updated Christian Bauer's famous VIC-II dokument to PDF format and fixed some pictures in it to make some things more clear. Unfortunatelly some things in this dokument looks like it's not quite correct or more likely I just don't have enough knowledge to understand it. Anyway, the document is now under the file section, check it out and leave a comment if you have something to say.

The work with sprites have been quite promising, I made a small test program in assembler to test the interrupt latches, loaded into Vice for reference. After some bugfixes my FPGA worked like the emulator. ... read more

Posted by Fredrik Beckman 2018-10-22

Arduino replacement

I have as I wrote earlier been quite unpleased with the serial interface between my PC and the FPGA. On the Vic64 you have the special keys [CONTROL], [LSHIFT], [RSHIFT] and [COMMODORE]. There are also obviously the function keys, [RUN/STOP] and [RESTORE] key. I wanted to scan [ALT] on the PC to bind it to [COMMODORE] which was a tricky task to do. Also the auto repeat on the PC became a problem in TeraTerm. So I decided to try windows programming (which I really don't like).... read more

Posted by Fredrik Beckman 2018-10-10

Debug interface

I have been working with the debug interface the latest days. It resulted in some work with both memory interface and the testbenches for debug, which I haven't used for a while, so they were ... incorrect. I know that you should always run all testbenches, but I have to admit that setting up a good test environment is not really a thing I do if I'm not forced to. So instead I do the basement firm approach - run the testbenches when a bug appears or when testing new functionality. This is not the best approach, I actually found a bug I missed just the other day. There was a pixel bug in the VIC-II module, the first column of pixels in each character got the next characters color. Which now is corrected, but I guess you see my point.... read more

Posted by Fredrik Beckman 2018-10-03

Sprites

Sprites, or MOB as they are called in the VIC specification, are really fun. I wanted to post a small video about my progress, but I haven't figured out how to do that. I can't say that everything is in place just yet but now I tested with sprite 0 (the 7 other sprites should work but not yet tested) and it works. I have only implemented this in one-color mode for now, multicolor is to be fixed at a later point.... read more

Posted by Fredrik Beckman 2018-09-28

Current hardware

The setup

The hardware in use for the moment is not the perfect setup that I dreamed about. I really would like to have a couple of joystick inputs, a ps/2 keyboard interface and some kind of a speaker output. To be honest I already have this stuff (just not integrated), but I have been coding and for the moment I actually don't need it.... read more

Posted by Fredrik Beckman 2018-09-20

VIC-II: Border unit works

The setup

Now border unit works with RSEL, CSEL, YSCROLL and XSCROLL. Great success! It has been a tricky task since I made a shortcut when fixing RSEL and YSCROLL. When I started with XSCROLL I noticed that I really needed a proper border unit to make it work but so there was no idea waiting for it to happen by itself. The problem I had with XSCROLL is that it seems like XSCROLL and YSCROLL behaves different relative the border flip-flops. I still haven't got it all right so the code is not really as clean as I would like it to be. I will get back to that when starting with the sprites but now it works as it should when just running in standard text mode without sprites.... read more

Posted by Fredrik Beckman 2018-09-19

Background

Setup
I worked with VHDL in a project a couple of years which I found very fun. Compared to C code which I do normally it felt like an vitamin injection, I really had to change the way I think, how I design the code. When the VHDL part in the project ended, it felt empty and I wanted to continue so in Mars 2017 I got a FPGA development board - http://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=English&CategoryNo=218&No=1021 - and started to test the VGA output.
When I got it to work I started to think of how to use it in a fairly useful implementation. Perhaps a VGA card for my old VIC64? I know there are some FPGA solutions for the old 8 bit computers, not only the 64, but since I wanted to do something on my own I searched for info on the web. I found more than I could imagine. The 6569 also known as VIC-II in the 64 was (slightly?) more complicated than I thought and I wanted to code. Now. So instead I started to build a simple graphic module late summer 2017, a much more simple one than the VIC-II. I added the character ROM and got something that worked. During (about) September-October I made a debug interface to read and write the memory in the FPGA from a terminal program. It was fun but something was missing.... read more

Posted by Fredrik Beckman 2018-09-17
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.