Mist/Mistica FPGA

You need an actual VIC.

Moderator: Moderators

nippur72
de Lagash
Posts: 574
Joined: Thu Sep 07, 2006 8:35 am

Mist/Mistica FPGA

Post by nippur72 »

I am playing with this nice FPGA board called "Mistica" which also implements a VIC-20 :D

It's a clone of the "Mist" board, featuring a plexiglass case, onboard composite video output and MIC/EAR ports for loading from real tapes.

The VIC-20 core was not so accurate, but I learned some VHDL/Verilog and was able to fix some issues. The sources are on GitHub and the author welcomes pull requests :D

Attached some pictures and a video of the tape loading feature that I'm adding to the core.
56618810_789320654773635_1072288050584748032_n.jpg
Immagine2.jpg
Immagine.jpg
User avatar
cercamon
Vic 20 Amateur
Posts: 42
Joined: Sun Dec 28, 2014 4:41 am

Re: Mist/Mistica FPGA

Post by cercamon »

Very nice fpga box, I own one of those as well and it's fascinating how it is able to reproduce so many systems, computers, consoles and arcades.

The Vic core is quite good and I hope that by the time I'm writing the tape loading modification has been received and implemented by the core developers.

Very nice job, @nippur72. I also would like to have a go at that gomoku game, if still available. Thx.
User avatar
beamrider
Vic 20 Scientist
Posts: 1452
Joined: Sun Oct 17, 2010 2:28 pm
Location: UK

Re: Mist/Mistica FPGA

Post by beamrider »

Nice.

I have a MiSTer which is derived from MIST.

Perhaps your core can also be ported across to MiSTer?
nippur72
de Lagash
Posts: 574
Joined: Thu Sep 07, 2006 8:35 am

Re: Mist/Mistica FPGA

Post by nippur72 »

the VIC20 core has also the noise generator reverse-engineered by Lance Ewing (there's a long thread about that here on Denial), and the pwp/viznut waveforms. I coded them for the MiST but I'm not sure they propagated to the Mister. But as I'm going to get a Mister as well, I'll check it myself sometime in the future.

Regarding the game GOMOKU, you can find it here. As It beats me all the times, I think I'll add an option for giving an handicap, not sure how. Perhaps letting the human player play with one piece already on the board.
User avatar
beamrider
Vic 20 Scientist
Posts: 1452
Joined: Sun Oct 17, 2010 2:28 pm
Location: UK

Re: Mist/Mistica FPGA

Post by beamrider »

I think the Vic-20 core on MiSTer is perhaps a little neglected. The inter channel distortion is much exaggerated rendering it useless to my ears.
nippur72
de Lagash
Posts: 574
Joined: Thu Sep 07, 2006 8:35 am

Re: Mist/Mistica FPGA

Post by nippur72 »

beamrider wrote: Sat Jun 20, 2020 5:19 am I think the Vic-20 core on MiSTer is perhaps a little neglected. The inter channel distortion is much exaggerated rendering it useless to my ears.
for the same reason on the MiST I added a toggle for turning off the 6KHz audio filter. It made the sound too muffled, not as brilliant as in the real VIC-20.
User avatar
eslapion
ultimate expander
Posts: 5458
Joined: Fri Jun 23, 2006 7:50 pm
Location: Canada
Occupation: 8bit addict

Re: Mist/Mistica FPGA

Post by eslapion »

nippur72 wrote: Sat Jun 20, 2020 7:42 am
beamrider wrote: Sat Jun 20, 2020 5:19 am I think the Vic-20 core on MiSTer is perhaps a little neglected. The inter channel distortion is much exaggerated rendering it useless to my ears.
for the same reason on the MiST I added a toggle for turning off the 6KHz audio filter. It made the sound too muffled, not as brilliant as in the real VIC-20.
Does anyone know the order of that filter ?

On the real VIC-20, there are 2 filters in series on the audio output of the 6560/61. They are both simple RC filters, the first one having a cut-off frequency of 15.92 kHz (and it uses the 1kOhm output impedance of the VIC-I to function) and another with a cut-off at 1.592 kHz. However, they both are 1st order filters so the effect on frequencies between 1.592 kHz and 15.92 kHz increases very gradually with frequency - 10dB/decade.

On frequencies above 15.92kHz, the effect increases at 20dB/decade.

Two capacitors of 0.1uF and 0.01uF as well as a resistor of 1kOhm are the involved components here.
Be normal.
User avatar
beamrider
Vic 20 Scientist
Posts: 1452
Joined: Sun Oct 17, 2010 2:28 pm
Location: UK

Re: Mist/Mistica FPGA

Post by beamrider »

Slightly OT, but I would have thought there would have been an option by now within MAME to eliminate this distortion by amplifying each channel separately and mixing them together in the output buffer.
Vic20-Ian
Vic 20 Scientist
Posts: 1214
Joined: Sun Aug 24, 2008 1:58 pm

Re: Mist/Mistica FPGA

Post by Vic20-Ian »

Nippur,

Does your Mist/ Mistica core for the Vic20 play the speech in Berzerk MMX+?

MiSTer does not :-(
Vic20-Ian

The best things in life are Vic-20

Upgrade all new gadgets and mobiles to 3583 Bytes Free today! Ready
nippur72
de Lagash
Posts: 574
Joined: Thu Sep 07, 2006 8:35 am

Re: Mist/Mistica FPGA

Post by nippur72 »

Vic20-Ian wrote: Mon Jun 22, 2020 2:08 am Does your Mist/ Mistica core for the Vic20 play the speech in Berzerk MMX+?

MiSTer does not :-(
Yes it does, I wrote the fix myself :)

And it's a very quick fix, the problem is that when the voice is turned off it should output 50% amplitude and not 0%. The 50% value is what makes POKE 36878,15 emit a "pop" sound.

I don't know the Mister VIC 20 codebase, I think it was forked from MiST at a certain point in time and from then only occasionally reconciled.

I don't have a Mister to try, but I can look at the code, and if I manage to compile it perhaps I can send you a file to try.
Vic20-Ian
Vic 20 Scientist
Posts: 1214
Joined: Sun Aug 24, 2008 1:58 pm

Re: Mist/Mistica FPGA

Post by Vic20-Ian »

Thank you Nippur, happy to test.

Link to my MiSTer thread here

https://misterfpga.org/viewtopic.php?f=12&t=264
Vic20-Ian

The best things in life are Vic-20

Upgrade all new gadgets and mobiles to 3583 Bytes Free today! Ready
User avatar
beamrider
Vic 20 Scientist
Posts: 1452
Joined: Sun Oct 17, 2010 2:28 pm
Location: UK

Re: Mist/Mistica FPGA

Post by beamrider »

@Ian - do you find the MiSTer distortion bearable?

To me it makes the Vic core useless. I've tried several different monitors, all with the same result.

It's only the Vic-20 core, all the others are fine so don't think it's my hardware.
Vic20-Ian
Vic 20 Scientist
Posts: 1214
Joined: Sun Aug 24, 2008 1:58 pm

Re: Mist/Mistica FPGA

Post by Vic20-Ian »

I have not done a great deal with it but did play a few of my favourite games like Star Defence and Myriad and did not have an issue that made it unusable.

The missing voice on Berzerk MMX+ was a disappointment.
Vic20-Ian

The best things in life are Vic-20

Upgrade all new gadgets and mobiles to 3583 Bytes Free today! Ready
nippur72
de Lagash
Posts: 574
Joined: Thu Sep 07, 2006 8:35 am

Re: Mist/Mistica FPGA

Post by nippur72 »

I was able to setup the IDE and compile for the Mister.

I merged the the audio section of the 6561 I wrote for the MiST last year, indeed the Mister code was very old dating back to my intervention, so it also lacks all the improvements on the video section that have been written for the MiST in the while. It's a pity there there is no central repository with just one single implementation always kept update.

I've put the resulting .RBF file here if you want to give it a try. Consider that I don't own a Mister yet, so it was a completely "blind" build. It's the first ever Mister core that I compile, so I don't know if it starts at all.

Anyway, if everything is ok, you should be able to hear the voice in Berzerk MMX+. Please let me know.

Regarding the audio distortion you mentioned, I guess it's something that has to do with "audio mixing" outside of the VIC20 emulation. I don't know much of the Mister yet, the code looks foreign to me, also because it's a much more complex machine than the MiST. Apparently there is a HDMI audio, a SPDIF audio and normal audio. And also a "linux audio"!

The issue I supect might be here, but I'm totally clueless:

Code: Select all

always @(posedge clk) begin
	reg signed [16:0] a1, a2, a3, a4;

	a1 <= is_signed ? {ca[15],ca} : {2'b00,ca[15:1]};
	a2 <= a1 + {linux_audio[15],linux_audio};

	pre_out <= a2[16:1];

	case(mix)
		0: a3 <= a2;
		1: a3 <= $signed(a2) - $signed(a2[16:3]) + $signed(pre_in[15:2]);
		2: a3 <= $signed(a2) - $signed(a2[16:2]) + $signed(pre_in[15:1]);
		3: a3 <= {a2[16],a2[16:1]} + {pre_in[15],pre_in};
	endcase

	if(att[4]) a4 <= 0;
	else a4 <= a3 >>> att[3:0];

	//clamping
	out <= ^a4[16:15] ? {a4[16],{15{a4[15]}}} : a4[15:0];
end

User avatar
beamrider
Vic 20 Scientist
Posts: 1452
Joined: Sun Oct 17, 2010 2:28 pm
Location: UK

Re: Mist/Mistica FPGA

Post by beamrider »

Thanks, for this.

Will take a look as soon as can, currently in the middle of decorating the home/office, so MiSTer not set up.
Post Reply