GandALF, substitute for the MOS 325572-01

Discuss anything related to the VIC
groepaz
Vic 20 Scientist
Posts: 1180
Joined: Wed Aug 25, 2010 5:30 pm

Re: GandALF, substitute for the MOS 325572-01

Post by groepaz »

one major problem is that in a C64 (unlike in many other systems) the VIC plays an integral role in the system, when it doesnt work (at least halfway) right, then *nothing* works. you must get all the external timing perfectly right before you can even try it out in a C64 - in practise that means first developing it in a complete fpga system is a much better approach. once you got the functionality right, you can then put it into a drop in replacement much easier.
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
User avatar
cbmeeks
Vic 20 Enthusiast
Posts: 190
Joined: Tue May 18, 2004 12:36 pm
Website: http://meeks.co
Location: 8-bit Land
Occupation: Code Monkey

Re: GandALF, substitute for the MOS 325572-01

Post by cbmeeks »

groepaz wrote:one major problem is that in a C64 (unlike in many other systems) the VIC plays an integral role in the system, when it doesnt work (at least halfway) right, then *nothing* works. you must get all the external timing perfectly right before you can even try it out in a C64 - in practise that means first developing it in a complete fpga system is a much better approach. once you got the functionality right, you can then put it into a drop in replacement much easier.
Actually, the guy that designed the F18a has a design log. He did just that for the TMS9918 replacement. He found some cores for an MSX or maybe Coleco, etc. Some cores that contained an implementation of the TMS. What he discovered was that the implementations logic was so integrated with the base system that it couldn't really stand on its own. So he ended up ditching the copied version and starting from scratch.

It was a very interesting read.

http://codehackcreate.com/archives/30
Cat; the other white meat.
User avatar
eslapion
ultimate expander
Posts: 5458
Joined: Fri Jun 23, 2006 7:50 pm
Location: Canada
Occupation: 8bit addict

Re: GandALF, substitute for the MOS 325572-01

Post by eslapion »

groepaz wrote:
The VIC-I and VIC-II are a really special case because they incorporate both digital and analog electronics technology.
there is very little analog stuff in either. if you make the replacement generate for example HDMI instead of analog video, then you can eliminate all of that. (and even if you dont, using a sigma-delta DAC instead of the analog voltage divisor is not rocket science either)

the SID btw generates output at 1Mhz - and contains a whole lot more analog stuff than any other chips in a CBM machine.

and no, lack of EE knowledge certainly is not a reason for it :)
The VIC-I has a dot clock of about 4MHz, the VIC-II has a dot clock around 8 MHz. The SID can be emulated by software on a uC board because by today's standards 1 MHz is extremely slow.

David Viens, the creator of the menu software for the 1st Behr-Bonz has been successful at software emulating a 6502 using a teensy 3.6 board. This thing carries a 32 bit CPU running in excess of 150 MHz to do that.

The people who do this sort of thing are highly qualified programmers but they know virtually nothing of EE. Threshold voltages, slew rate and impedance load are usually not stuff they understand or even see the relevance of.
cbmeeks wrote:Yeah, I'm not sure I agree with that. The F18a (a TMS9918 drop-in replacement) was designed by someone learning EE. And, over time, it became a 100% cycle-accurate replacement that uses VGA instead of composite. I have one in one of my TI's and it works wonderfully.
I don't understand exactly where you disagree. The F18a uses an FPGA so this is not software emulation at all.

I checked and it seems to be out of stock which is unfortunate because I would have purchased one right away and installed it in my Colecovision even if it is considerably more expensive than an actual TMS9928 you can find on eBay.

I can only assume the creator of the F18a has the complete knowledge of the TMS9918a and TMS9928 required to reproduce the whole thing. It doesn't seem to be something we have for the VIC-I or VIC-II.

To create GandALF I compared the schematics of the VIC-1540 with the schematics of the later 250442/250446 boards of the 1541 and determined what exactly was integrated in the IC 325572-01.
Last edited by eslapion on Fri Jul 28, 2017 6:23 pm, edited 2 times in total.
Be normal.
groepaz
Vic 20 Scientist
Posts: 1180
Joined: Wed Aug 25, 2010 5:30 pm

Re: GandALF, substitute for the MOS 325572-01

Post by groepaz »

The VIC-I has a dot clock of about 4MHz, the VIC-II has a dot clock around 8 MHz. The SID can be emulated by software on a uC board because by today's standards 1 MHz is extremely slow.
8MHz are no less slow by todays standards really. The reason for why SID is relatively easy to do compared to a VIC is that the SID only has a couple of registers and never reads from memory. And of course because it doesnt matter to the rest of the system if the SID works right or not. (which swinsid for example does not do - it does not respond correctly when rapidly writing to the registers. it just doesnt matter much in practise because normally music players dont do that)
The people who do this sort of thing are highly qualified programmers but they know virtually nothing of EE. Threshold voltages, slew rate and impedance load are usually not stuff they understand or even see the relevance of.
hooray for generalization \o/ that statement is probably about as true as what i learned about canadians from southpark.
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
User avatar
eslapion
ultimate expander
Posts: 5458
Joined: Fri Jun 23, 2006 7:50 pm
Location: Canada
Occupation: 8bit addict

Re: GandALF, substitute for the MOS 325572-01

Post by eslapion »

@Groepaz
I don't understand what you're arguing about.
... in practise that means first developing it in a complete fpga system is a much better approach. once you got the functionality right, you can then put it into a drop in replacement much easier.
If I understand you correctly, we have exactly the same position on this.

FPGA is not software emulation.
8MHz are no less slow by todays standards really.
Are you saying it should therefore be easy to make a software/uC based drop-in replacement of the VIC-I or VIC-II ?
Be normal.
groepaz
Vic 20 Scientist
Posts: 1180
Joined: Wed Aug 25, 2010 5:30 pm

Re: GandALF, substitute for the MOS 325572-01

Post by groepaz »

do you realise that you are the only one trying to nail this on software emulation? :)
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
User avatar
eslapion
ultimate expander
Posts: 5458
Joined: Fri Jun 23, 2006 7:50 pm
Location: Canada
Occupation: 8bit addict

Re: GandALF, substitute for the MOS 325572-01

Post by eslapion »

groepaz wrote:do you realise that you are the only one trying to nail this on software emulation? :)
Well well... let me see.

I was answering to cbmeeks who said:
... Same goes for the SID. We have some emulation options for the SID but it's just that...emulation.
... and I said...
The VIC-I has a dot clock of about 4MHz, the VIC-II has a dot clock around 8 MHz. The SID can be emulated by software on a uC board because by today's standards 1 MHz is extremely slow.
To which you decided to reply...
8MHz are no less slow by todays standards really. The reason for why SID is relatively easy to do compared to a VIC is that the SID only has a couple of registers and never reads from memory. And of course because it doesnt matter to the rest of the system if the SID works right or not.
(added edit: This statement is actually false. I did once repair a C64 in which the SID was tying down the databus so it prevented the computer from working.)

...and I replied to you...
Are you saying it should therefore be easy to make a software/uC based drop-in replacement of the VIC-I or VIC-II ?
But now you've decided...
do you realise that you are the only one trying to nail this on software emulation?
You have decided to reorient the topic of this thread ? BTW, the OP was about a drop-in replacement for IC MOS 325572-01.

If you decide to reply to my posts, can I kindly ask you to reply to what I actually posted ?
Be normal.
groepaz
Vic 20 Scientist
Posts: 1180
Joined: Wed Aug 25, 2010 5:30 pm

Re: GandALF, substitute for the MOS 325572-01

Post by groepaz »

yeah sure, you are right. as always :roll: (it wasnt me who started with the "offtopic". nor did cbmeeks specifically nail it on software emulation.)
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
User avatar
eslapion
ultimate expander
Posts: 5458
Joined: Fri Jun 23, 2006 7:50 pm
Location: Canada
Occupation: 8bit addict

Re: GandALF, substitute for the MOS 325572-01

Post by eslapion »

groepaz wrote:(it wasnt me who started with the "offtopic". nor did cbmeeks specifically nail it on software emulation.)
No, but he specifically mentioned SID drop-in replacements and my point was that the SID can be replicated using software running in a uC because it is very slow.

Then you replied to what I said to him by mentioning 8 MHz is also extremely slow by today's standards. Ergo, you disagree with me and you're saying it is feasible to run a software emulation of the VIC-II in the same manner. Are you?

(unless, of course you simply disagree for the sake of disagreeing...)

If you know of a SID drop-in replacement that doesn't use a software running in a uC then I'd be glad to learn about it. I don't know of any and I don't think it's a good idea to have a VIC-II drop-in replacement that's based on a uC running a piece of software.

I think FPGA or CPLD are the way to go. Your previous posts seem to indicate you agree with me.
Be normal.
callan
Vic 20 Newbie
Posts: 16
Joined: Fri Oct 05, 2012 1:02 am

Re: GandALF, substitute for the MOS 325572-01

Post by callan »

That's actually pretty awesome!. I remember some years ago reading of someone reverse-engineering the 325572, using the 1540 long board as a starting point. That someone has crystallized it into new gate array silicon is nothing less than awesome. Another one to tick off the list.

The one I really wring my hands over is the TED. It's fragile and self-destructive, unique, ridiculously complex and it's manifold functions poorly documented. The habit they have of silently dying whilst in storage is particularly distressing.

But mad props for the GandALF!!! Thanks guys.,


Callan
groepaz
Vic 20 Scientist
Posts: 1180
Joined: Wed Aug 25, 2010 5:30 pm

Re: GandALF, substitute for the MOS 325572-01

Post by groepaz »

Then you replied to what I said to him by mentioning 8 MHz is also extremely slow by today's standards. Ergo, you disagree with me and you're saying it is feasible to run a software emulation of the VIC-II in the same manner. Are you?
i said that it is slow by todays standards. no more no less. all further conclusions are yours.
If you know of a SID drop-in replacement that doesn't use a software running in a uC then I'd be glad to learn about it
i know of two actually, one is here (the other does not have a website i think)
I think FPGA or CPLD are the way to go. Your previous posts seem to indicate you agree with me.
i agree that right now this is the better approach IF the goal is to have something that is cheap enough to produce for sale. on the other hand, its certainly possible to do it with some microcontroller, but you'll need a pretty fast one, with fast i/o and memory - and it will likely be more expensive than a small fpga board.
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
User avatar
eslapion
ultimate expander
Posts: 5458
Joined: Fri Jun 23, 2006 7:50 pm
Location: Canada
Occupation: 8bit addict

Re: GandALF, substitute for the MOS 325572-01

Post by eslapion »

callan wrote:That's actually pretty awesome!. I remember some years ago reading of someone reverse-engineering the 325572, using the 1540 long board as a starting point. That someone has crystallized it into new gate array silicon is nothing less than awesome. Another one to tick off the list.
I'm glad you like it.

This is the information I have used as source of information:
1540 encoder/decoder...
http://personalpages.tds.net/~rcarlsen/ ... 1540-2.GIF

1541 encoder/decoder...
http://personalpages.tds.net/~rcarlsen/ ... 1542-2.GIF

With these 2, it becomes pretty clear what was discreet logic ICs and placed into the 325572-01. In the real VIC-1540, the logic chips are all 74LS series IC and it should be easy to reduce the amount of power used by the drive just by changing them with 74HCT ICs.
groepaz wrote:i know of two actually, one is here (the other does not have a website i think)
Very interesting project. The board is somewhat large but I think it's a much better approach than SwinSID.
Be normal.
User avatar
eslapion
ultimate expander
Posts: 5458
Joined: Fri Jun 23, 2006 7:50 pm
Location: Canada
Occupation: 8bit addict

Re: GandALF, substitute for the MOS 325572-01

Post by eslapion »

I started this project having in mind to develop my abilities and skills mostly but there are 2 units sold already... not bad.
Be normal.
User avatar
cbmeeks
Vic 20 Enthusiast
Posts: 190
Joined: Tue May 18, 2004 12:36 pm
Website: http://meeks.co
Location: 8-bit Land
Occupation: Code Monkey

Re: GandALF, substitute for the MOS 325572-01

Post by cbmeeks »

I didn't mean to make this topic get out of focus. My apologies on that.

For the record, I do understand the difference in FPGA design and software emulation. In fact, I've built several circuits around FPGA's.

My original point was that I was surprised that a drop-in replacement for the VIC-1 or VIC-2 haven't been done (yes, with FPGA) because the C64 and VIC-20 are so popular in the retro scene. I'm sure *someone* has the technical know-how and resources to make it happen. And I'm sure it would never be 100% accurate. But a VGA monitor for my VIC-20 would be awesome. And sometimes "good enough" is good enough.

That's all I meant...really. :-)

Also, I do understand the timing differences. I do understand why a uC running at 100 MHz can't easily reproduce even simple 74xx logic IC's because of the parallelism and the cycles uC's need to do anything. Something as complex as the VIC-2 could never be reproduced 100% with a uC.

Anyway...back to the OT.
Cat; the other white meat.
User avatar
cbmeeks
Vic 20 Enthusiast
Posts: 190
Joined: Tue May 18, 2004 12:36 pm
Website: http://meeks.co
Location: 8-bit Land
Occupation: Code Monkey

Re: GandALF, substitute for the MOS 325572-01

Post by cbmeeks »

eslapion wrote:I started this project having in mind to develop my abilities and skills mostly but there are 2 units sold already... not bad.

That's awesome. Congrats on that. I do like seeing these retro-based projects take off.
Cat; the other white meat.
Locked