How to activate GRAPHIC mode for VDC?

Started by MIRKOSOFT, November 02, 2010, 10:08 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MIRKOSOFT

Hi!


I want to programming graphics in 80 columns mode (VDC).
I have VDC8568 chip with 64kB RAM.
I want to use standard resolution 640x200, but with most of colors in one 8*8 cell.
Can anybody explain me how to set graphic mode of VDC with best color possibilities in resolution 640x200 in assembler?
Also: where to store bitmap and where color attributes...


Many thanks for every reply.


Miro
MIRKOSOFT of megabytes

Commodore 64 was great, Commodore 128 is bigger, better, faster and more!!!

http://www.mirkosoft.sk

saehn


MIRKOSOFT

Many thanks!


But I want to really programming graphics on VDC without external additions like BASIC8, this I know also have internal EPROM, but don't want to use.


I need independent code....
MIRKOSOFT of megabytes

Commodore 64 was great, Commodore 128 is bigger, better, faster and more!!!

http://www.mirkosoft.sk

BigDumbDinosaur

Quote from: MIRKOSOFT on November 03, 2010, 02:29 AM
Many thanks!


But I want to really programming graphics on VDC without external additions like BASIC8, this I know also have internal EPROM, but don't want to use.


I need independent code....
Then start typing!  Everything that you need to know to drive the VDC in hires mode is available online, much of it right here.  Geesh!
x86?  We ain't got no x86.  We don't need no stinking x86!

Hydrophilic

Set bit 7 of register 25 to enable bitmap mode.  I know you said you have 64k VRAM, but for anyone with 16k VRAM, you also need to disable color(attributes).  Do this by clearing bit 6 of register 25.  Register 25 is pretty important, huh?

With 64k VRAM, you should put your bitmap above the standard text screen and font to avoid re-loading the text/font data after exiting bitmap mode.  Because the standard location for text/font data is below $4000, I suggest putting the color at $4800 and the bitmap at $8000.  For anyone with 16k VRAM, you have to put the bitmap at $0000.

Set the color(attributes) address via registers 20 (adrs high) and 21 (adrs low).

Set the bitmap address via register 28.  The high 3 bits specifiy the address high byte.  It's kind of confusing to explain in words, so...

;assumes bank 15
bmadrs = $8000
ldx #28
jsr $cdda ;read register
and #$1f ;clear high 3 bits
ora #$e0 & >bmadrs
jsr $cdcc ;write register


That should get you started.  I recommend reading the C128 Programmer's Reference Guide, in particular pages 314 to 318 which explain VDC bitmap mode and include an ML program example.
I'm kupo for kupo nuts!