64 mode and VDC

Started by xlar54, June 07, 2006, 02:05 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

xlar54

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.

Blacklord

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

xlar54

Very interesting... i wonder where I could find some example code of doing such things.  Love the 64 mode hacks ;)

enigma

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

Fröhn

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.

Khyron

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

Steve Gray

#6
ARC...hmmm, can anyone recommend a utility to read this archive on the PC running Vista 64-bit?

cbmguy

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

Khyron

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...

saehn

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 handles it just fine, along with many other CBM archive formats.

Markoh

#10
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

saehn

Open DirMaster. Click Disk --> Batch Processing. Select the D64 directory. Choose your other options. Click OK. Onnea!  :)