Commodore 128 Alive!

Commodore 128 => Herdware => GO64 => Topic started by: xlar54 on June 07, 2006, 02:05 PM

Title: 64 mode and VDC
Post by: xlar54 on June 07, 2006, 02:05 PM
Is it possible to access the VDC from 64 mode? I read somewhere that from 64 mode, you can go into a quasi-fast mode (2 mhz) but only under certain circumstances. Made me wonder what else 64 mode can access, such as the VDC.
Title: 64 mode and VDC
Post by: Blacklord on June 07, 2006, 06:57 PM
Quote from: xlar54Is it possible to access the VDC from 64 mode? I read somewhere that from 64 mode, you can go into a quasi-fast mode (2 mhz) but only under certain circumstances. Made me wonder what else 64 mode can access, such as the VDC.
It is possible to use the VDC chip in C64 mode on a C128 but this is not a trivial task since the Kernal in the C64 does not support using the VDC chip and routines from the C128 Kernal would therefore have to be copied into the C64 RAM memory and be modified appropriately. The terminal program Novaterm is an example of a program that uses the VDC chip in C64 mode.

A much easier thing to do is to use the VDC RAM memory as extra memory in C64 mode. By doing this, you will have 80 kB or 128 kB of RAM memory available in C64 mode instead of 64 kB (although the VDC RAM memory is more difficult and slower to access than the normal C64 RAM memory).

Lance
Title: 64 mode and VDC
Post by: xlar54 on June 08, 2006, 08:38 AM
Very interesting... i wonder where I could find some example code of doing such things.  Love the 64 mode hacks ;)
Title: 64 mode and VDC
Post by: enigma on June 24, 2006, 12:39 AM
The only problem with ram disk etc. is that early VDCs give rarely corrupted bits on data transfer. Even if you wait like:

WRITEVDC  subroutine
          ldx #$1f
          stx VDCREG
.1        bit VDCREG
          bpl .1
          sta VDCDATA
.2        bit VDCREG
          bpl .2
          rts

There is an easy way to check this. Just init graphics mode, fill with a pattern where every 5th Bit is set and then use a routine that  reads a memory location shifts the read value one to the left and writes it again. (You have to shift once more if carry was set after first shift with ROL)
For a perfect working VDC you will get a slowly scrolling screen with near diagonal lines. For bit errors you will get here and there additional or deleted pixels. I have tested this way several C128[D] and none had a VDC that didn't show at least one error after some hours.
This doesn't matter for graphics so much, but as ramdisk, I wouldn't use it.

As for the C64 mode, the VDC is still visible at $D600 as the SID is not mirrored in the C128.
You can run f.e. Risen from Oblivion from Crest/Oxyron in C64 Mode on a C128 (and it runs even in 1 MHz Mode as timing isn't as stable at 2 MHz due to VIC DRAM refresh cycles).

Ciao...
...Micha
Title: 64 mode and VDC
Post by: Fröhn on November 10, 2006, 07:27 PM
Quote from: adminA much easier thing to do is to use the VDC RAM memory as extra memory in C64 mode. By doing this, you will have 80 kB or 128 kB of RAM memory available in C64 mode instead of 64 kB (although the VDC RAM memory is more difficult and slower to access than the normal C64 RAM memory).
It's not as easy as you think. Since the VDC RAM needs memory refresh cycles too, you have to enable a valid screenmode with 5 refresh cycles per rasterline before the VDC RAM can hold the data forever. Many C64 programs which use the VDC RAM as extra memory ignore this and might show unstabilities because of this, especially if you directly went to C64 mode so no VDC register got initialized with some senseful value.
Title: Re: 64 mode and VDC
Post by: Khyron on February 10, 2010, 07:58 AM
Sorry about raising the dead, but in case someone was actually looking for an answer to this topic..

Years ago I designed a hardware project to connect a VDC (and 2nd sid) to a C64, I also included software to set the 80Col mode, and patch the kernal $ffd2 to display text/BASIC & editor output on the VDC, it also has an Ipaint viewer for 64mode etc..

The hardware maps the vdc in the same location as on the 128, so all the software also works on a 128 in 64 mode..  The software & Schematics are here..

http://cbmfiles.com/genie/geniefiles/C64-128Toolkit/VDC64APRO.ARC
Title: Re: 64 mode and VDC
Post by: Steve Gray on February 11, 2010, 04:10 AM
ARC...hmmm, can anyone recommend a utility to read this archive on the PC running Vista 64-bit?
Title: Re: 64 mode and VDC
Post by: cbmguy on February 11, 2010, 06:21 AM
I used DOSBOX on this 64-bit LINUX then stararc to create the .d64.  Should work the same on your 64bit windoze.  Here's the .d64 (.zip'd)

C
Title: Re: 64 mode and VDC
Post by: Khyron on February 11, 2010, 07:21 AM
Arc250 will take it apart on an emulator or the real thing..
took me a while to find arc250 and take a look at the files,
it's not the last version I released, so it's missing the $FFD2 hook ( and a cheezy simple paint program that works in that I-Paint/basic-8 interlace mode..)
but the prg's are there to init the VDC properly and copy over the charset etc.. I'll dig around this weekend and see if I can find the floppy where I have the $FFD2 hook , and all the source code for the prg's.. and put them up...
Title: Re: 64 mode and VDC
Post by: saehn on February 13, 2010, 03:23 AM
Quote from: Steve Gray on February 11, 2010, 04:10 AM
ARC...hmmm, can anyone recommend a utility to read this archive on the PC running Vista 64-bit?

DirMaster (http://style64.org/dirmaster) handles it just fine, along with many other CBM archive formats.
Title: Re: 64 mode and VDC
Post by: Markoh on February 13, 2010, 09:58 PM
Dirmaster look´s very good program, thank you for the link!
-one thing is, how can I save .d64 directories on hardrive(bitmap or text). I try but file size was 0 bytes...  :o
Title: Re: 64 mode and VDC
Post by: saehn on February 14, 2010, 11:03 AM
Open DirMaster. Click Disk --> Batch Processing. Select the D64 directory. Choose your other options. Click OK. Onnea!  :)

EhPortal 1.34 © 2025, WebDev