Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Programming Turbo Chameleon 64
2013-01-25 23:21
Hermit

Registered: May 2008
Posts: 208
Programming Turbo Chameleon 64

I couldn't find a topic about using the extra functions in te Turbo Chameleon 64 card which I got recently from Vesalia.

I started experimenting based on the info I took from programming and core-development manuals but I couldn't get far yet.
The manuals are very well done, but as usually, I like to see some example code-snippets to find out how (in what order) to make things working in practice.

I could turn on turbo 6510 mode, debug overlay mode, which were great experiences, but I couldn't use the VGA video modes (I've set the suggested values for 800x600 resolution but it didn't generate sync and graphics for the monitor).

I'd appreciate if anyone else trying these could post what could be found out so far...

If we could make an article about this in Codebase64 that might be a dream came true ;)

Here's a TASS source I've done when I had a little time one afternoon:
         SEI
         LDA #$2A ;ACTIVATE CONFIG.MODE
         STA $D0FE
         LDA #%11000000 ;DEBUG OVERLAY
         STA $D0FB
         LDA #%10100000 ;CPU TURBO MODE
         STA $D0F3

         LDX #%00001001 ;ENABLE PALETTE
         STX $D0FA      ;AND VGA+COP
         LDY #0
VGASETLP LDA V800X600,Y
         STA $D040,Y
         LDA VGACONF,Y
         STA $D050,Y
         INY
         CPY #$10
         BNE VGASETLP

         LDY #0  ;FILL PALETTE - maybe they're zeroes by default, I fill them with data to see colors (in 16bit mode palette might be ignored?)...
WPALLP   TYA
         STA $D100,Y
         ASL A
         STA $D200,Y
         ASL A
         STA $D300,Y
         INY
         BNE WPALLP

WAITKEY  LDA $DC01 ;this doesn't debounce but for terminating with C= key it's OK, coz it won't write to the source accidentally on return
         INC $D020
         CMP #$FF
         BEQ WAITKEY

         LDA #0
         STA $D0FA ;RETURN FROM VGA MODE
         STA $D0F3 ;TURBO MODE OFF
         STA $D0FB ;DEBUG OFF
         LDA #$FF
         STA $D0FE ;EXIT CONFIG.MODE

         RTI ;RETURN TO TASS  -was it done like this or with BRK/RTS? i don't remember but it worked...


;-------------------DATA----------------

V800X600 .BYTE <800,<600,$32  ;RESOLUTIO  - upper nybbles of these values can be automated by this formula (hres/16+vres/256) - but in TASS I preferred readibility
         .BYTE <1040,<666,$42 ;TOTALSIZE
         .BYTE <860,<980,$33  ;HSYNC-POS
         .BYTE <625,<631,$22  ;VSYNC-POS
         .BYTE 1 ;SELECT ADJUSTED OBJECT
         .BYTE 0 ;1ST OBJECT TO RENDER
         .BYTE 8 ;LAST OBJECT TO RENDER
         .BYTE %11000100 ;POLARITY,CLOCK

VGACONF  .BYTE 0,0,0,200,200,0 ;POS,SIZE ;just some experimental values, I had no chance to see what they would draw on the screen
         .BYTE 64,0,0 ;LINE-INC,MMU SLOT
         .BYTE %00010010 ;FLIP & STRETCH
         .BYTE 4,4,2,0 ;SCROLL,PAL.OFFS.
         .BYTE %00000010 ;COLLISIO,ALPHA
         .BYTE %01010100 ;8BIT MODE

;=======================================

Maybe the problem is that I forget to turn VICII emulation off, didn't have the time to test it yet but trying that as soon as I can...
A Turbo Chameleon 64 emulation might come handy in VICE for cross-developmen to that card...maybe it's there already and I missed the info.. it would be a hard work to simulate that FPGA-based card in VICE I guess.
2013-01-26 01:08
chatGPZ

Registered: Dec 2001
Posts: 11386
the palette registers are gone with the new VGA controller, and the details of the respective modes come from an internal table (the additional colors are needed for the upcoming PAL emulation, and we need the i/o space) so what you see is expected :) (you should report it on the ml though, clearly a bug in peters documentation :))

it now looks like this
VGAMODE	=	$d040 ; 0-... (vga mode, as in menu)
VGACTRL	=	$d041
VGACTRL_BUFFER_SHIFT	=	0
VGACTRL_FILTER_SHIFT	=	2
VGACTRL_SCANLINES_SHIFT	=	6
VGACTRL_VICSYNC_SHIFT	=	7
VGACTRL_BUFFER_MASK	=	(3 << VGACTRL_BUFFER_SHIFT)
VGACTRL_FILTER_MASK	=	(3 << VGACTRL_FILTER_SHIFT)
VGACTRL_SCANLINES_MASK	=	(1 << VGACTRL_SCANLINES_SHIFT)
VGACTRL_SINGLEBUFFER	=	$00
VGACTRL_DOUBLEBUFFER	=	$01
VGACTRL_TRIPLEBUFFER	=	$02
VGACTRL_FILTERNEAREST	=	$00
VGACTRL_FILTERSCALE2X	=	$04
VGACTRL_FILTERALIEN	=	$08
VGACTRL_SCANLINES	=	$40
VGACTRL_VICSYNC	=	$80
2013-01-26 10:00
Hermit

Registered: May 2008
Posts: 208
Thanks for the info, Groepaz.

So the specification has changed since beta 7...(i hoped for only slight changes, but the decision for the pre-stored modes to reduce IO-usage was a good idea.)
I could only find programming manual for beta 7 in pdf-format at Syntiac page.
Is there a source (at least in txt format) with the new beta 8c register-layout somewhere? Could you point out a link?

My aim is to try out bigger resolutions on the VGA port while the C64 has its own normal display at the same time. The FAQ page said there's no software support for that at the moment but I'd write that kind of software...actually I'd like to experiment with a GUI with window management based on Objects of COP.
I see a big red NO in the COP field of the 'Beta Period' page, has this been changed meanwhile with a 'complete redesign'?

If it's better for the project I'll subscribe and report further findouts on the mailing list, but first I have to see what the current specs are...

thx
2013-01-31 01:36
chatGPZ

Registered: Dec 2001
Posts: 11386
Quote:
Is there a source (at least in txt format) with the new beta 8c register-layout somewhere? Could you point out a link?

it should be in the programmers manual that comes with the core update - if not please report it on the ml (this is peters domain, i cant fix it)

however, only the VGA stuff changed (to what i pasted) - everything else has been stable for a while now and probably will not change anymore.

Quote:
My aim is to try out bigger resolutions on the VGA port while the C64 has its own normal display at the same time. The FAQ page said there's no software support for that at the moment but I'd write that kind of software...actually I'd like to experiment with a GUI with window management based on Objects of COP.
I see a big red NO in the COP field of the 'Beta Period' page, has this been changed meanwhile with a 'complete redesign'?

COP was removed completely, it never worked right/as intended and the new VGA controller can do the things it was ment for (like scaling the image to fullscreen) much better than COP ever could.

other than that, if you want to play around with "dualscreen vga", disable VIC->VGA in the menu, and then just write to the framebuffer (get the base adress from the respective MMU registers). not sure how or even if that works for whatever you want to do though, i dont think anyone ever tried :) (dont bother using reu for dma copying btw, in turbo mode a simple copyloop is faster =P)
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Guests online: 83
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.6)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Triad  (9.3)
5 Censor Design  (9.3)
Top Swappers
1 Derbyshire Ram  (10)
2 Jerry  (9.8)
3 Violator  (9.7)
4 Acidchild  (9.7)
5 Cash  (9.6)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.042 sec.