1 (edited by WoS 2013-11-10 12:41:17)

Topic: VIC20 core talk

Checked in a first version of Mikes VIC-20 core. It requires the latest ARM firmware to load programs (PRG files).

Possible configurations:
- VIC-20 classic (unexpanded)
- VIC-20 with 3k RAM expansion
- VIC-20 with 8k RAM expansion
- VIC-20 with 16k RAM expansion
- VIC-20 with 24k RAM expansion
- VIC-20 with 8k ROM cartridge
  (it is also possible to auto-load a cartridge via INI file,
   an example is included but just commented-out)

Issues:
- currently the keyboard is not controlled by the Replay framework yet which could make problems when initially loading the core (can be fixed by shortly disconnect the keyboard), this is still a TODO
- tested successfully some games, some other games/cartridges just freeze, needs more debugging... sad
- load/store using tape or floppy not yet possible, this will need some support of commodore tape and disk files (thinking of using 1541u in future)
- memory usage on the FPGA still not optimal - uses more block-RAMs than really needed

Usage - load programs to RAM:
- load one of the ini files via OSD (preconfigured expansion memory settings available)
- load a PRG file via OSD (take care the PRG fits to the memory setup of the core)
- exit OSD and enter "RUN"

Usage - cartridge setup:
- load the unexpanded ini file via OSD
- load a PRG file via OSD (target of the PRG must be $A000)
- enable the cartridge via OSD
- perform a core reset via OSD
- exit OSD

/WoS

Re: VIC20 core talk

Some images:

Start of core (unexpanded):
http://www.pin4.at/tmp/replay_vic20_unexpanded.png

Krazy Kong (with 16k expansion):
http://www.pin4.at/tmp/replay_vic20_16k_krazykong.png

/WoS

Re: VIC20 core talk

Fantastic news! Big ups!!!

Re: VIC20 core talk

Update on the VIC-20 core, I did implement the generic keyboard mapper and adopted the keyboard setup for this core. In the doc directory a file "Keyboard_Map_VIC20_C64.pdf" shows the actually used keyboard setup.

For now the mapping is fixed, the next release will allow upload of other mappings or change some keys (e.g. QUERTZ to QUERTY or so) of this default via INI file. When it is complete, I'll also move it to the replay library and test it on other cores as well - e.g. for arcade games to emulate coin entries etc...

/WoS

Re: VIC20 core talk

Sweet!

6 (edited by WoS 2013-12-27 11:28:03)

Re: VIC20 core talk

Did some updates:
- Support of SD (interlaced: Composite,SVHS,HDMI) video in parallel to HD (progressive: VGA,DVI-A,DVI-D,HDMI) video.
  For now requiring two separate INI setups. Will merge them in future again.
- Today I improved also audio, added proper filtering as found on the original setup. Not yet fully there...

/WoS

Re: VIC20 core talk

Nice work!

Back when I was a kid, my VIC-20 had something called a "Super Expander".  IIRC with was a cart that added 3KB of RAM and offered new BASIC commands and "high res" graphics.  Is a *.CRT image for this available?

Re: VIC20 core talk

Good point! I found something on zimmers about the VIC-1211:

ROM:
ftp://www.zimmers.net/pub/cbm/vic20/rom … pander.prg
Manual and some examples:
ftp://www.zimmers.net/pub/cbm/vic20/man … -expander/

You can configure a 3k expansion as well as an additional ROM expansion at $A000 and upload the image there. Either via OSD or directly by setting up an INI and directly boot into this mode.

Will give it a try and see if/how it works (and of course fix it if it doesn't) - and assuming it is the right ROM code there...
I can also add a preconfigured INI for this setup to show how it is done.

/WoS

Re: VIC20 core talk

Wolfie, any eta d64 and tap support?
Once that is supported some heavy testing can begin! smile

10

Re: VIC20 core talk

By the way: some guys developed the "Final Expansion" VIC-2009, but all links to the original documentation/project code (especially schematic etc. and firmware sources for the latest version 2) seem to be dead (e.g. http://vc20final.t-winkler.net/zip/ )

Would like to support it - should be no problem on the replay even with much more than 512k RAM wink
Anyone knows where all the stuff can be found?

/WoS

11 (edited by WoS 2014-01-09 11:32:46)

Re: VIC20 core talk

spotUP wrote:

Wolfie, any eta d64 and tap support?
Once that is supported some heavy testing can begin! smile

I still hope there is someone who wants to volunteer, I have so many projects on my list I want to set up  smile

I'll wait on Mikes Amiga setup for the initial file handling ARM<->FPGA and build on that. Does not make too much sense to work in parallel here and maybe ending up with incompatible solutions. The idea is again to have a framework suitable for all cores, not yet another minimg clone.

I am also not sure yet if I should take all the effort for a full 1541-like emulation in FPGA like the x1541 or just handle it on the ARM like the sd2iec.  Both would be possible, there should be even enough room to implement an AVR core in the FPGA and let the original sd2iec FW do the job. Have not looked yet in detail to these solutions to decide how "re-usable" they are in terms of documentation, license and readability.

But first I will add an external IEC interface adapter/connector on the AUX lines on the board and connect a real 1541 and sd2iec to check if the core in principle would work.

And there are several PRG files yet where I am not sure if it is a bad download or if they should work and the core is simply not executing them correctly. Especially the less sophisticated one would be great (e.g. more CPU and less VIC focussed), as they are easier to pipe-clean the setup first.  wink
So any hints on PRG files which are known to work and fail on this core are highly appreciated - just post them here, I can consolidate them and publish a list here (i'd just add it in the first post I made here).

/WoS

Re: VIC20 core talk

wolfgang wrote:

Good point! I found something on zimmers about the VIC-1211:

Nice find!  Reading that PDF manual took me back.  smile

13

Re: VIC20 core talk

spotUP wrote:

Wolfie, any eta d64 and tap support?
Once that is supported some heavy testing can begin! smile

Jumping forth and back with the projects...

I did a quick look to Gideon's 1541ultimateII development and saw it is really nicely structured and well implemented (with clock gating and so on). So I removed the memory bus stuff and replaced it by some configurable block RAM from the Replay framework and got already a 1541 instance for the Replay. I can already read the 1541 status message after power on. big_smile
I like this approach much more, as it will allow to use all fastloaders, Geos and so on, like an original device.

The "connection" to the d64 file on a sdcard is yet missing, a load"$",8 works in principle, but still gives a disk error. I will do the missing link in HW (via a VHDL state machine) instead of a SW like approach Guideon used - just to avoid yet another SW development environment and especially to allow direct load/store of files from the Replay ARM environment (which will be selected via the already existing OSD/menu approach).

(I hope) the final adoption should be just a minor task as soon as Mike has the generic floppy stuff tested for the Amiga and is stable. For now I'll test with a "hardcoded" file in memory instead. This might be available soon - or course I'll also try to keep eveything "encapsulated" that one can directly use the 1541 instance for C64/C16/Cxxx cores as well.

My problem is more in the direction that I should really know the d64 file format and variants (or better the g64 Guideon is converting to) before messing it up - thus I will probably start with read-only support to be on the safe side and proceed with more studies on this topic ;-)

/WoS

14 (edited by WoS 2014-01-17 16:57:34)

Re: VIC20 core talk

darrin wrote:

Back when I was a kid, my VIC-20 had something called a "Super Expander".  IIRC with was a cart that added 3KB of RAM and offered new BASIC commands and "high res" graphics.  Is a *.CRT image for this available?

Just checked in a "SuperExp.ini" and "SuperExp_SD.ini" plus all the ROM / example files I found and tried some of the sound and graphics examples. Works just fine with the actual VIC core. It is even possible to configure a version with 16k RAM, of course due to the shift of the basic RAM start adress original PGM files won't load correctly with the "direct" Replay loader (as it always takes the address as found in the file), the real VIC with tape/floppy should handle it properly (when not using the famous second ',1' parameter on the load command).

Bass sound is still quite bad, I need to do something about it...  sad
Maybe it is also time for a "turbo mode", filling a circle takes ages... smile

/WoS

Re: VIC20 core talk

@ Wolfgang:

Thanks for checking.  That sounds great.  I can just about remember how slow those hi-res graphics were, but it was still a thrill to draw "cobwebs" on the screen.  smile

Question:  I have an old prototype FPGA Arcade with the old Amiga core from years ago.  Can I run the VIC core on it (via another SD card), or will I need to do an update to my board (and if so, would that update kill my current Amiga core).

16

Re: VIC20 core talk

darrin wrote:

Question:  I have an old prototype FPGA Arcade with the old Amiga core from years ago.  Can I run the VIC core on it (via another SD card), or will I need to do an update to my board (and if so, would that update kill my current Amiga core).

Unfortunately it requires the new ARM setup for all the new (generic) configuration features (clocks, video, menu,...), the old one was more or less "hard coded".

It won't run at all with the old one. So you always need to flash then the old firmware for the old Minimig setup or the latest one for all other cores on SVN. And as the old one didn't implement an USB bootloader you have to do the "low-level" erase and then program with bossa or samba. So I wouldn't really recommend to do that as it  always requires a bit of work...

Don't be too worried, yesterday I figured out how to handle the floppy media just in hardware (I also digged out my good old "Data Becker" books...) and started with the last piece of the 1541 implementation (yet with paper and pencil). So I hope when the new Amiga is ready the whole VIC setup should be nearly complete as well... smile

/WoS

Re: VIC20 core talk

wolfgang, lovely reading!!!

18 (edited by darrin 2014-01-23 19:42:55)

Re: VIC20 core talk

@ Wolfgang

Sounds fantastic.  I'll just keep on drooling.

As I'd like to send my board back to Mike for the USB keyboard/mouse mod (I have an X500 case I want to put this in), perhaps he'll reprogram the board for me too.  On the other hand, I'm tempted to get another new board and make an Arcade machine cabinet...

19 (edited by WoS 2014-01-25 16:10:03)

Re: VIC20 core talk

Nearly there. big_smile big_smile big_smile

Took a little longer because I did a new implementation of the 1541 to re-use Mikes 6502 and 6522 implementations, which are IMHO much more accurate. I also did implement a new floppy "physical" streaming block, emulating a floppy media in pure VHDL (instead of using another processor for format handling and bitstream coding - as all the 1541 implementations I know do).

Most things done, now I "just" need to connect to d64 files I will map to the Replay DRAM. Initially I will focus on read-only support.

http://www.pin4.at/tmp/replay_vic20_1541_status.png

Oh, and I need to have some thoughts on block RAM allocation (or better de-allocation and move to DRAM), for now I had to disable the 16/24k RAM extension of the VIC-20 part as it did not fit on the FPGA anymore. But that's a just a small detail smile

/WoS

Re: VIC20 core talk

Great work.  Keep us updated, this is fascinating stuff.  smile

21

Re: VIC20 core talk

Here it is - a functional alpha version  wink

http://www.pin4.at/tmp/replay_vic20_1541_works.png

It loads D64 files, but it still has some issues with the media emulation. Not sure if it is the emulator implementation itself or somewhere at the highspeed DRAM interface while fetching the data. Simulations will show...

Some media change mechanism is missing yet as well (toggling the write-protect LED as with the real device when inserting a floppy).

Tomorrow is another day. With some luck I can fix it, do some cleanup and check-in a first beta version until the SVN is up again...

/WoS

22 (edited by darrin 2014-01-25 22:25:07)

Re: VIC20 core talk

Wow!  Absolutely amazing.  Great job Wolfgang.  I think the FPGA Arcade is going to really impress the public thanks to the work being done on the cores as well as the actual hardware.

One question, why does the VIC-20 use *.d64 files... should they be *.v20 files?  big_smile

(Reminds me of when I had my VIC-20 and C-64 hooked up side, by side and would occasionally load a C64 program on the VIC by mistake and vice-versa) because they were mixed on the same floppy disk.

Re: VIC20 core talk

.d64 images a disk images for 1540/1541/1571 disk drives.  You can use these drives with a VIC-20, in fact the 1540 was designed for the VIC-20.

24 (edited by darrin 2014-01-26 20:09:46)

Re: VIC20 core talk

I was trying (feebly) to make a joke Jim.  big_smile

There's a reason why I cant make a living as a stand-up comedian.

25

Re: VIC20 core talk

darrin, funny is I also thought something like a v20 extension would be more appropriate when I did add the menu wink

/WoS