6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Nov 24, 2024 12:45 am

All times are UTC




Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: Sat Nov 25, 2023 8:46 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8514
Location: Midwestern USA
Here’s a blast from the past.

While rummaging around on one of my servers looking for something, I came across some software I originally developed in 1987.  It was part of the truck leasing and billing package I wrote to run on a system consisting of multiple Commodore 128DCR computers and a Xetec Lt. Kernal hard drive subsystem.  Years later (2008, to be exact), I dusted off the original code, edited so it could be called from within a BASIC program, and gave it the name “80 Column Display Manager” or 80CDM.  It was published on Lance Lyon’s now-defunct C-128 site he ran for a number of years.

After Lance’s site was shut down, I was no longer messing with Commodore stuff, so I forgot about this software again.  I’ve once more resurrected it and with a little cleanup, packaged it in a ZIP for anyone who might be interested.  It will work with a C-128 equipped with 16KB or 64KB of video RAM, with many of its features only available if 64KB of video RAM is present.  64KB of video RAM was standard in the C-128DCR, and could be added to a “flat” C-128 or a C-128D, the latter which was a model sold in Europe—the DCR was produced for the North American market.

ZIP contents include:

  • 80cdm.bin — Display manager executable binary.

  • 80cdm.asm — Source code for 80cdm.bin.

  • dsline.bin — BASIC 7.0 status line writer executable binary.

  • dsline.asm — Source code for dsline.bin.

  • 80cdm.pdf — Display manager documentation.

If you do decide to give this software a try, please read the documentation first.  After all, you don’t want to overstress the C-128’s reset button, do you?  :D

Attachment:
File comment: C-128 80 Column Display Manager
80cdm.ZIP [840.1 KiB]
Downloaded 555 times

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Sun Nov 26, 2023 6:42 pm 
Offline

Joined: Wed Jan 03, 2007 3:53 pm
Posts: 64
Location: Sunny So Cal
Interesting work. The VDC is a really underused chip. It has a lot of quirks but it's capable of some neat tricks.

_________________
Machine room: http://www.floodgap.com/etc/machines.html


Top
 Profile  
Reply with quote  
PostPosted: Sun Nov 26, 2023 7:02 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8514
Location: Midwestern USA
6502inside wrote:
Interesting work. The VDC is a really underused chip. It has a lot of quirks but it's capable of some neat tricks.

It’s not too difficult to understand if you have any familiarity with the MC6845E, after which the VDC was modeled.

The one really brain-dead thing about the VDC was its designer (Kim Eckert) stubbornly insisted on making the copy/repeat count register (register $1F) an 8-bit counter, instead of 16-bit.  I read somewhere that Fred Bowen, who was responsible for much of the C-128’s firmware, got into a shouting match with Eckert over that omission, as it substantially complicated the parts of the 128’s screen kernel that were responsible for display clearing and scrolling—blitting operations, if you will.  It definitely complicated the 80 Column Display Manager’s design, which makes heavy use of blitting.

Speaking of the 8568 in particular, there was an eBay vendor who was selling a bunch of them from a repair parts inventory they had from their Commodore days.  I was tempted to buy some and see if I could design a video card.  What stopped me was I could not find a VDC data sheet anywhere.  Even Bil Herd, the C-128’s principle hardware designer, didn’t have one.  Not having a data sheet would have forced me to make WAGs about chip timing and glue logic design.  I wasn’t willing to run the risk of damaging an 8568 due to some wrong assumption.

——————————————————
Edit: I belatedly recalled the VDC designer’s name, and also that he and C-128 designer Bil Herd got into it as well over some of the VDC’s brain-deadness.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Last edited by BigDumbDinosaur on Wed Nov 29, 2023 10:24 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Sun Nov 26, 2023 8:11 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8514
Location: Midwestern USA
BTW, it was noted there are some minor boo-boos in the documentation PDF.  I’m guessing those have been there all along and I just didn’t notice.  I will fix them and post a new copy ASAP.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 27, 2023 8:54 pm 
Offline

Joined: Tue Jul 05, 2005 7:08 pm
Posts: 1043
Location: near Heidelberg, Germany
BTW I modelled my "VICCY II" in parts after the VDC: https://github.com/fachat/csa_ultracpu/ ... D/VIDEO.md

What I found interesting was that the VDC was able to display character cells of different widths! So you could have chars of 7 or 9 or other bits width. I don't know the internals of the VDC, but this feature should result in different memory access speeds. Or at least some complicated shift register wizardry... (this one of the features I didn't implement).

Also, my CPU can access memory directly, so I don't have some copy/fill feature.

_________________
Author of the GeckOS multitasking operating system, the usb65 stack, designer of the Micro-PET and many more 6502 content: http://6502.org/users/andre/


Top
 Profile  
Reply with quote  
PostPosted: Mon Nov 27, 2023 9:41 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8514
Location: Midwestern USA
fachat wrote:
What I found interesting was that the VDC was able to display character cells of different widths!  So you could have chars of 7 or 9 or other bits width.

I believe that feature, as well as some others, had to do with the VDC’s originally-intended purpose, which was to be the console display hardware in CBM’s Z-8000 UNIX machine (the CBM 900) that never got built.

Quote:
I don’t know the internals of the VDC, but this feature should result in different memory access speeds.  Or at least some complicated shift register wizardry... (this one of the features I didn’t implement).

“Mapping the Commodore 128” has a decent discussion on the VDC, as does Abacus Software’s (Data Becker’s) “Commodore 128 Internals.”  Neither describes what internally goes on with the VDC (which I don’t think was common knowledge at the time—I’ve never even seen a data sheet for the device) and neither mentions the 8568, although my understanding was that version of the VDC was about to enter production by the time those books were published.  The 8568’s interrupt output looked interesting from the standpoint of using IRQs to drive the VDC.  However, it was not connected in the C-128DCR, so it was something I never explored.

Abacus’ book included a sample program for doing basic hi-res graphics on the VDC.

Quote:
Also, my CPU can access memory directly, so I don’t have some copy/fill feature.

Copy/fill was definitely a necessity with the VDC, especially since all I/O accesses with the C-128 occur at 1 MHz, whether in FAST mode or not.  In your case, you can manipulate video RAM without the indirection involved with the VDC.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Tue Nov 28, 2023 8:20 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8514
Location: Midwestern USA
Here is a cleaned-up copy of the display manager’s documentation.  I believe I have fixed all errors (famous last words :D).

Attachment:
File comment: C-128 80 Column Display Manager Documentation
80cdm.pdf [775.87 KiB]
Downloaded 52 times

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Sat Dec 30, 2023 3:56 am 
Offline
User avatar

Joined: Sat Jun 08, 2013 4:02 pm
Posts: 46
Cool, cool. Thanks for sharing. Much more versatile than what I came up with in 1989. My utility would save an 80 column screen and its screen editor values to the unused 4K of 16K VDC memory. That's what I had at the time and didn't want to go out on a limb and write code I could not confirm would work with 64K I didn't have.

My program's main purpose was to save a screen prior to opening a window, then restore it when the window was closed. It had a few "frills", such as the ability to jump from one window to another, then return to the point you had left the first one. It could also save 40 column screen editor values to VDC RAM, should that be needed for some reason I've long forgotten.

http://www.sdiy.org/richardc64/transact ... /p017.html
http://www.sdiy.org/richardc64/transact ... /p018.html
http://www.sdiy.org/richardc64/transact ... /p019.html

_________________
"I am endeavoring, ma'am, to create a mnemonic memory circuit... using stone knives and bearskins." -- Spock to Edith Keeler


Top
 Profile  
Reply with quote  
PostPosted: Sat Dec 30, 2023 7:32 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8514
Location: Midwestern USA
richardc64 wrote:
Cool, cool. Thanks for sharing. Much more versatile than what I came up with in 1989...

I recall those articles in Transactor.  I had an article in that same issue, which was about hooking up a Centronics printer to the user port on a C-128.  Whomever edited the article messed it up a bit.  :evil:

It was possible to do quite a bit with the VDC, even in bitmap mode.  I never exploited its graphics capabilities, other than to write a simple driver that would put the VDC into bitmap mode, set or clear a pixel, easy stuff like that.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Mon Jan 01, 2024 10:53 pm 
Offline

Joined: Wed Jan 03, 2007 3:53 pm
Posts: 64
Location: Sunny So Cal
For years my biggest use of the VDC was mostly from C64 mode (storing data there as a cache), and the occasional boot into CP/M. Lately I've been experimenting more with it, even came up with a nice stable 320x200 mode (the advantage being 2MHz operation and less memory overhead).

_________________
Machine room: http://www.floodgap.com/etc/machines.html


Top
 Profile  
Reply with quote  
PostPosted: Wed Jan 03, 2024 2:06 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8514
Location: Midwestern USA
6502inside wrote:
For years my biggest use of the VDC was mostly from C64 mode (storing data there as a cache), and the occasional boot into CP/M. Lately I've been experimenting more with it, even came up with a nice stable 320x200 mode (the advantage being 2MHz operation and less memory overhead).

At one point, I did a little messing around with driving the VDC from C-64 mode.  I actually contemplated coming up with a new Kernal ROM, with the VDC driver taking up space normally occupied by the tape routines.  However, around that time, I got a large programming project going for the C-128/Lt. Kernal combination and had little time to fiddle with the VDC in C-64 mode.  I also discovered that Fiscal Information had usurped some of the tape routine space for Lt. Kernal-specific subs, so that blew away my idea of burning a custom ROM.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 43 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: