6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri Nov 22, 2024 8:51 pm

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Thu May 30, 2013 6:36 pm 
Offline

Joined: Sat Apr 20, 2013 6:10 pm
Posts: 5
Hi there!

I'm from the Commodore scene and my favourite 8-bit-machine is the C128. It's a weird system: Two processors, two videochips, two banks of 64K, and a rather crazy MMU. And a C64 mode is also implemented. Using the Z-80 it's also CP/M compatible, making the C128 probably the most versatile 8-bit-computer available.

As every Commodore computer, there are a lot of hardware connectors like the user-port or the expansion port. But if you create a board for these ports, other useful hardware couldn't be connected. But the C128 has a special feature, the internal function ROM, in socket U36. It's a socket for a 27C256 EPROM, so it has an adress space of 32K from $8000 to $FFFF with a 4K gap at $D000 for I/O. Using the MMU it's possible to activate and deactivate areas. Using this method it's possible to use external RAM instead of an EPROM which could be used by an external, or better internal processor board. The 32K area could be used to exchange data within the C128 and the internal processor board. This should work rather well, the 17xx series RAM Expansion Units allow with it's DMA chip in only a 10 bytes area ($DF00-$DF0A) fullscreen video on the C64 with 0.985 MHz.

http://www.youtube.com/watch?v=Yo7uXaV6Q1s

The internal processor board should work with a modern version of the 6502 (G65SC02, R65C02, WDC65C802) to get more speed. An alternative would be a 6502-based microcontroller, to get more I/O lines without using external chips. For RAM it's neccessary to get a chip compatible to a 27C256 eprom, to connect it to the internal U36 socket. The board is built around the socket (it's the empty one on the picture), it would have space lying over the ROM chips. The mainboard of the flat C128 has a great layout at all, especially if you count for all it's functions.

http://upload.wikimedia.org/wikipedia/commons/0/03/C128mobo.jpg

As own video controller a MOS VDC 8563 (Video Display Controller) would be an idea. It's the same like in the C128, so they are easy to get. It runs independendly from the computer's clock rate, normally a 16 MHz oscillator is used. It also has 64K own graphics memory. The VDC is indirect programmed, so it only uses two bytes in the adress room. Normally it was designed for 80x25 text mode in 16 colors, but it is very flexible, so it is possible to display up to 720x700 interlaced or VDC-FLI modes in 640x480 with high color graphics.

http://www.bilder-hochladen.net/files/big/c4q7-6w-e4a6.jpg
http://www.bilder-hochladen.net/files/big/c4q7-6x-cb70.jpg

The VDC has RGB digital output with TTL level, but it's possible to convert it to 15 kHz RGB analog. With other converters it's possible to get Composite, S-Video or VGA. A 15 kHz-capable monitor or a scandoubler is required, though. As I/O chips I thought on the corrected versions of the 6522, this would be the CMDµ G65SC22 or the Rockwell R65C22. They don't have the shift register bug, are available in higher speeds and also in a PLCC case, this saves space. To complete the system, a SID 8580 could be added for sound.

I don't know about an own OS yet. Using the board only as additional proccessor a very small OS for easy data exchange would be enough. If the system should be a standalone computer, it needs a full ROM and some kind of user interface, f.e. a DOS or a BASIC interpreter. An implementation of the CBM serial bus in the ROM would be ideal. It needs one 8bit port of the 65C22 and would allow to connect disk drives, hard disks, SD-cards or else without wasting memory, and since JiffyDOS is existing the transfer speed is rather high. But a complete OS with I/O and everything would need a lot of memory if no bankswitching is used. The C64 does this using the 6-bit I/O-port of the 6510, the C128 has the MMU 8722 and the address manager 8721 for it. An alternative would be a 65C816 system from the beginning, with the first 32K as shared memory. But this would make the whole thing much more complicated ;)


Creating an internal SBC for the C128 may sound weird, but it makes more sense than other SBC creations. I don't think in the all the different 6502 SBC projects here are compatible systems, everyone has different hardware, ROM, OS and more. If there would be an board which is directly shared with the memory map of an existing and good known computer, it would be possible that more people are using it. If the main components (CPU, RAM) will be shared, easy data exchange is possible, this would allow a multiprocessing system. If the internal board gets own I/O and video, they could work completely independent, but still have the ability to exchange data. This would be much more flexible than a standalone SBC.

If you're more interested in the C128, check out our forum http://www.commodore128.org/

Greets, RC.


Top
 Profile  
Reply with quote  
PostPosted: Thu May 30, 2013 7:30 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8543
Location: Southern California
Welcome! It sounds like you have a great project there. I have quite a collection of C64's & C128's and accessories and books and software that I need to put on my website to give to anyone who can use it who wants to come pick things up or pay the shipping. I guess I was waiting for a chance to inventory all the Apple II stuff also, and post it all at once. I don't want that valuable history to be lost to E-waste or the landfill. Our sons used it in the 1990's, but my own 6502/816 use is quite different, so I'm not using them.

About the 65(c)22's: They all have the shift-register bug, in mode 011, shifting in with external clock. You mention Rockwell's not having it, but I was using Rockwell R65C22P4's when I discovered the bug for myself. I address the bug, and the workaround, at viewtopic.php?f=4&t=2175.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Thu May 30, 2013 7:53 pm 
Offline

Joined: Sat Apr 20, 2013 6:10 pm
Posts: 5
Well yes, I always have a lot of ideas, some maybe only freaky ideas, some things would be possible to realize. But I don't know anyone who's doing hardware, especcially if it's more specific. I'm rather good in planning, but I can't do hardware. This is rather frustrating as you may imagine ;) So I'm searching on various places some people who're also interested building a new computer (with old-aged features). And, like explained, the integration in an existing system maybe more useful than a complete standalone system for which is no software available.

To the VIA bug: The wikipedia mentions that the CMDµ G65SC22 doesn't has this bug:

http://en.wikipedia.org/wiki/MOS_Technology_6522

In the C128 forum we were discussing the CMD FD-2000 and FD-4000 drives (1.6 MB HD and 3.2 MB ED disks) lately, they're also using this chip, with 2 MHz. But it wouldn't be a problem anyway. Because of the VIA bug the serial IEC bus in the VIC-20 was implemented in software, being slower. For compatibility reasons they kept these routines in the C64, but because its larger programs, the slower CPU and the slightly slowed down 1541 drive loading times got very high. The C128 has a fast serial bus using the 6526, and the 1570, 1571 and 1581 disk drives also have the very fast burst mode. But using JiffyDOS the C64 isn't slower loading than the C128's fast serial bus. So for a serial IEC bus the shift register wouldn't be neccessary.


Top
 Profile  
Reply with quote  
PostPosted: Thu May 30, 2013 8:12 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8543
Location: Southern California
Quote:
Well yes, I always have a lot of ideas, some maybe only freaky ideas, some things would be possible to realize. But I don't know anyone who's doing hardware, especcially if it's more specific. I'm rather good in planning, but I can't do hardware. This is rather frustrating as you may imagine ;) So I'm searching on various places some people who're also interested building a new computer (with old-aged features).

You've come to the right place. That's not to say everyone will jump on your project (as we all have our own that need completion), but you'll find plenty of help getting going. Interestingly (but not surprisingly), everyone here has their own strengths, widening the scope of knowledge on the forum among the various members.

I have a CMD 65c22 in something I use on the workbench all the time too, so I could check for the bug there; but I can't get to it right away. WDC has by far the fastest parts though (16MHz, not 4MHz), and they're in current production, with no end in sight; so I think it would be best to design around them and just put the flip-flop in if necessary to get around the mode 011 bug. Or, maybe the faster speed (16MHz) would make the software route fast enough to make it worth going that way so you don't need the flip-flop.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Thu May 30, 2013 8:30 pm 
Offline

Joined: Sat Apr 20, 2013 6:10 pm
Posts: 5
I'm not sure if it makes sense to sync the new board with to the C128 or give it an own fixed clock. C64 and C128 timings are dependent on the video system and power frequency which are different in the USA and Europe.

power frequency:

EU: 50 Hz
USA: 60 Hz

CPU frequency:

PAL: 0.985 MHz
NTSC: 1.02 MHz

VIC-IIe video frequency:

PAL: 17.734472 MHz
NTSC: 14.31818 MHz

Software has to be fixed to work on PAL and NTSC computers correctly. The english GEOS versions always had a wrong time in Germany because of the power frequency, the C64 is generating the timing from it. Video is another thing, especcially on the very timing-intense C64 demos from the demoscene. These are mostly designed for the PAL system.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 22 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron