Re: VIC20 core talk

wolfgang wrote:

... until the SVN is up again...

I'll be back later today and move the SVN server to the otherside of the bust firewall, so it should be up by Monday mid day CET.


Re: VIC20 core talk

No hurry. I can use the time for more cleanup and testing...


28 (edited by WoS 2014-01-26 19:09:10)

Re: VIC20 core talk

darrin wrote:

... I'll wait for an OK from Wolfgang first as he might get more questions from new subscribers as a result. ...

If it is ok with Mike (its his website), it is fine for me as well.

In the meantime I found the bug, 1541 works like a charm. The red "power" LED on the replay states if a disk is inserted (means: a d64 file selected) the green "disk" LED has the same function as the red LED on a 1541. Didn't do too much cleanup yet, lost quite some time now with play... ehm, I mean, testing the core wink

As all ROMs are set up via sdcard, it should be possible to load a 1540 (aka v170) firmware as well. Not tried this yet.

I improved the VIC chip sound output, it's MUCH better now. Probably I need to do another optimisation round and equalise the four audio channels (and check "manually" against a real device).

I synthesized a VIC-20 setup allowing RAM extensions up to 16k and cartridges up to 4k. May set up a second "8k cartridge" version with less RAM (up to 8k). Unfortunately it won't map anymore on this FPGA with all options enabled sad  But as in reality there are rare setups requiring cartridge and RAM expansion the same time (except super expander, which is a 3k RAM + 4k ROM cartridge and thus works as well) - so I keep it like this until I know how I want to deal with memory in general. Probably go for DRAM here as well.

Several games and demos run, but there are still some issues with the VIC-20, where it either crashes or cause some weird video output.

As I did quite some rounds I figured out that there is probably still an issue with the ARM loader FW. Sometimes the VIC comes up with bad video sync, just performing a core reset via OSD fixes it again and the core works nicely again. Another topic to hunt down.

But hey, its a beta - and good enough to play some rounds already. big_smile big_smile big_smile



Re: VIC20 core talk

Updated the VIC-20 core on SVN and fixed to work with the actual Replay framework. Had some issues with the new DDR controller. Should be stable again.

Spend another hour for intensive pla... I mean serious testing. big_smile

I'll start a "compatibility" list now in here to keep track of working and non-working game- and demo programs. Will help to improve now step by step the core.


Re: VIC20 core talk

What's your high score on Donkey Kong for today?  wink


Re: VIC20 core talk

He, he...  wink

I really try to work on the bugs again (and only briefly start the games...), currently digging in the t65 core I am using, it has a bug in the BRK command I am trying to fix...  sad


32 (edited by WoS 2014-02-01 23:02:56)

Re: VIC20 core talk

Fixed the t65 bug (updated in the SVN CPU lib), now the VIC-20 does not deadlock when it executes a BRK.

Sometimes d64 files are not correctly load (not reproducible), still issues with the dram controller from the framework.
Thats why I found the BRK bug, as this is opcode $00 and this is also the value I get back from the controller.

Edit: DRAM working now, but still some issue on the IEC bus, seems to come from VIC-20 side, seems to stops transmission w/o any reason? further digging, probably an issue with the VIA implementation...



Re: VIC20 core talk

Fixed a bug in the 6522 VIA implementation causing IEC transmission to suddenly stop (wrong EOI detection due to not reset T2 flag in IFR on direct high-byte counter loads - changed also in T1 as it seemed to be wrong there as well).

Fixed a bug in handling the DRAM controller by the 1541 stream reader for D64 files.

Now the VIC-20 core loads files from the floppy properly (at least it seems so after some testing with the bball2.d64 demo).


Re: VIC20 core talk

oh, nice one!

Re: VIC20 core talk

Do you support both timers and the serial shifter in both of the VIAs?


Re: VIC20 core talk

It's Mikes code of the 6522, he did that already wink

By the way: I did add the code in the floppy streaming block fetching sector writes of the 1541, just running a stand-alone simulation on that.

My goal is to have read+write to existing d64 files implemented in the Replay code by this weekend (hopefully). The formatting procedure itself is somewhat more complicated and won't work soon - I am also not sure if this is really needed, one can always use an "empty" d64 file.


37 (edited by WoS 2014-02-06 23:03:37)

Re: VIC20 core talk

With more testing, I saw it is no solution to support only a basic 3k/8k/16k RAM extension and 4k cartridge ROM by the core. So I re-wrote the VIC-core and connected the DRAM.

The dram controller on the Replay framework didn't like me very much - so we spend some time with a beer together and now I have a new friend big_smile

The next release of the VIC-20 has theoretical 32MB RAM as extension wink
The other 32MB half I reserved for the floppy disk data.

This allows to fill all memory spaces with RAM, so games like AE (requiring 8k at $6000 and 8k at $A000) will work as well.
If I can grab the schematics for some existing memory extenders on the VIC, I can implement them easily.

Furthermore, block-RAM is only used for the RAMs directly connected to the VIC to avoid complex bus multiplexers. And I kept the ROMs to allow stand-alone testing. There is again quite some block RAM free again if one wants to use chipscope...

Now I just need to fix the PRG loader (broke it, but should be a minor task) and doing some more testing, then I'll check it in.

Edit:   The PRG loader is getting more an issue than I thought. For now I handled the syscon output with the data stream from the arm on block RAM only, now it can be of course a mixture of block ram and DDR ram. Of course I didn't thought about that. But I need to get it working again, otherwise it can't load cartridges at boot via ini anymore (e.g. super expander)...


38 (edited by Debvgger 2014-02-06 22:29:20)

Re: VIC20 core talk

Cool :-) Never got the opportunity to play with a Vic 20!

My software: [url][/url]
My music: [url][/url]
My work: [url][/url]


Re: VIC20 core talk

I wrote my own VIC-20 memory-test program (walking bits, chess pattern, ...).
Will check it in as d64 file, may come handy also for "real VIC-20" tests.

It did run quite a while without any issue - and finally it detected a memory issue!

Now I can track down the issue - hopefully ;-)



Re: VIC20 core talk

I checked in the core with DRAM support (allows all VIC-20 memory configurations). I did also add a "software" directory with the memory tester (including a ready-to-use D64 file - might come in handy also for memory testing on real VICs wink ). The PRG loader is not working yet in this new configuration (D64 support runs via 1541 and is thus still fine), scanlines are also not checked in for now, as I focus on this memory issue first to get it fixed.

Up to now I figured out the problem is HW dependent, on my older/early Replay board the VIC memory test runs fine for days, the new Replay board gives memory errors. As they are very rare, it takes quite some time to find them. Now I am tweaking the board DRAM settings and check if there is a stable point - which seems to work - actually I am down from a few fails per hour to about one memory fail in a few hours.

Discussion with Mike is ongoing, checking build constraints for the dram controller as well. For that I did add a .xise project file (in the new "ise" folder) with a proper build setup - reason is that ISE does a nice post processing of the tool output files which simplifies analysing the results...

Maybe one can check out this version and try it out as well...

Post's attachments

VIC20-test.png 120.65 kb, 2 downloads since 2014-02-15 

You don't have the permssions to download the attachments of this post.

Re: VIC20 core talk

I just got the VIC20 up n running. Hopefully I can find some time playing with it tomorrow. smile Splendid work, wolfgang!

Re: VIC20 core talk



Re: VIC20 core talk

Good to hear, thanks for the info!

The monitor sync issue is fully gone now or does it still happen some time?

I assume you use the latest version on SVN (with DRAM support - so all memory configs possible)? We had to tweak the DRAM setup a little as I had a issue with one board as mentioned before. This improved setup is included in the latest ARM FW release. Now I had the test running since Sunday and no error occured anymore. So I'm confident the memory stuff is 100% OK.

Please feel free to post any glitch with actual games/demos on the forum, I will add it to the compatibility list and helps to have some known setups for debugging. I suppose especially the VIC-I needs some further attention and it does not support the NTSC setup yet (is this needed?).

And not to forget merging the Amiga and the 1541 approach towards a generic FDD framework setup (including support of further file formats G64, SCP, ...).


Re: VIC20 core talk

I'm pretty sure the glitch with the video sync still happens, I caught it again the other day. Most perplexing.

Re: VIC20 core talk

I'm running the latest (as of yesterday evening) VIC20 core, but I still need to find out how to build and update the ARM fw. Mine is almost half a week old now. yikes

I notised two glitches. First, not all keys on the keyboard work. 1 and 3 works, but not 2. Second, it does not start up all the times. It freezes at the checkboard screen. Though I woulnd't raise formal bug reports until I've successfully updated to latest and greatest versions of all bits and pieces.

46 (edited by Johey 2014-02-19 21:36:11)

Re: VIC20 core talk

I ran VIC20 15 minutes this evening. Unfortunately my only spare time for today. sad I don't know what sync glitch you are talking about, but I have noticed a somewhat reproducible issue. When the onscreen menu is active and you browse between the pages, the screen turns black (including the onscreen menu) for a second, then comes back to life for a while, then turns black again and so on. It seems only to happen when browsing around in the menu.

(Edit: Still not updated the ARM fw...)


Re: VIC20 core talk

Latest version incl. bins for ARM are checked in. If you have SVN access, just browse to
and use this on a sdcard to upgrade (just select the INI). Should work with VIC and Amiga core.

Ah, the keyboard is generic but key maps can not be yet uploaded... Need to finalise this one (goal is to set it in the INI).
The actual map is commented here, I am using a compact one for my replay setup:

Hm, maybe the issue is not the video generator and video converter at all but the following OSD part of the Replay framework at the end. I am looking for some missing initialisation, as this would be the only explanation why it sometimes works flawlessly and sometimes not at all on the very same board... Does not really sound like a timing issue.


Re: VIC20 core talk

yes, my sync loss issues are exactly like joheys, and they are showing it's ugly face when the osd is active mostly, but not only.

Re: VIC20 core talk

I ran the VIC20 core without any issues with the 15Aug13 replay firmware.  I had no issues with it hanging.  Today I decided to update the firmware to the latest version, and now I see the hanging problem that others have described.  I also can not run any of the firmware versions with _SD in the name, but that has always been the case and I forgot to mention this to you.

50 (edited by WoS 2014-02-20 18:02:02)

Re: VIC20 core talk

Oh, thanks for this hint. Franky, I got this core lockups on load myself one or the other time lately, but as I do a lot of changing ini and bin files (including changing the sdcard while the board is on), I thought it is just because of this handling and I didn't care too much. I just selected the INI a second time, which always worked... tongue

This info helps, there were some changes with the latest merge of Mikes setup for the Amiga, need to carefully check the changes again, I hope I can find something this way. Alternatively I have my debug environment still set up here...

The latest VIC core has still some (new) issues I am aware of: I broke the the PRG direct-load (for cartridges) when I changed to DRAM for the VIC memory extensions. Had no time yet to look in detail to it, will be a weekend task. So the super expander INI setup currently does not work anymore. Thus, I removed the PRG download menu item for now...

Need to check if I did update the "_SD" INI versions with my the latest updates. Basically you can also load the non-SD INI version and switch the video mode in the OSD menu. With this menu item you can dynamically (and immediately) switch the video mode w/o reseting the core (if the attached e.g. a HDMI display supporting both modes). In a w.c. you have to use the left/right cursor blindly to restore the last mode, even if the display is off, the OSD is still "there".

Please note: SD variants requires to set up a SVHS, Composite or a HDMI cable with a TV/display supporting standard PAL. VGA/DVI monitors will very likely not work in this modes.

If I can't find the sync loss of displays I'll remove the video generator and video converter and change to a native video mode output (as Mike did on the Amiga). Unfortunately this will definitely break HDMI/DVI-D support, so only VGA and SVS/Composite will work then - I already had such a setup in the past (the VIC-20 has no conform standard PAL timing).

Anyone using HDMI / DVI-D yet or just classic VGA / DVI-A?