Question about the VSCL setting...
Bamse
Posts: 561
Howdy...
I just got my first video driver to work and a question popped up about the VSCL.
Some code I've seen just move a value to the clocks per frame field of the VSCL and leaves the clocks per pixel to zero.
Then the comment say something like "Output 16 pixels over the whole frame"...
This sounds a little bit confusing to me...
For example,
If I would just move 512 to the VSCL and not specify any clocks per pixel, what would waitvid output ?
mov VSCL, #512
waitvid My_Palette, My_Pixel_Data
Does it output 2 pixels since the clock per pixel (cpp) field is 8-bit and zero could be interpreted as 256 or does it automatically divide 512 with 16 for cpp and uses 32 for cpp?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Living on the planet Earth might be expensive but it includes a free trip around the sun every year...
Experience level:
[noparse][[/noparse] ] Let's connect the motor to pin 1, it's a 6V motor so it should be fine.
[noparse][[/noparse] ] OK, I got my resistors hooked up with the LEDs.
[noparse][[/noparse]X] I got the Motor hooked up with the H-bridge and the 555 is supplying the PWM.
[noparse][[/noparse] ] Now, if I can only program the BOE-BOT to interface with he Flux Capacitor.
[noparse][[/noparse] ] I dream in SX28 assembler...
/Bamse
I just got my first video driver to work and a question popped up about the VSCL.
Some code I've seen just move a value to the clocks per frame field of the VSCL and leaves the clocks per pixel to zero.
Then the comment say something like "Output 16 pixels over the whole frame"...
This sounds a little bit confusing to me...
For example,
If I would just move 512 to the VSCL and not specify any clocks per pixel, what would waitvid output ?
mov VSCL, #512
waitvid My_Palette, My_Pixel_Data
Does it output 2 pixels since the clock per pixel (cpp) field is 8-bit and zero could be interpreted as 256 or does it automatically divide 512 with 16 for cpp and uses 32 for cpp?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Living on the planet Earth might be expensive but it includes a free trip around the sun every year...
Experience level:
[noparse][[/noparse] ] Let's connect the motor to pin 1, it's a 6V motor so it should be fine.
[noparse][[/noparse] ] OK, I got my resistors hooked up with the LEDs.
[noparse][[/noparse]X] I got the Motor hooked up with the H-bridge and the 555 is supplying the PWM.
[noparse][[/noparse] ] Now, if I can only program the BOE-BOT to interface with he Flux Capacitor.
[noparse][[/noparse] ] I dream in SX28 assembler...
/Bamse
Comments
About two seconds after I hit the submit button I thought to my self, why not give this a try...
I'll have a look at your Machine Language Tutorial and also give this a try later tonight...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Living on the planet Earth might be expensive but it includes a free trip around the sun every year...
Experience level:
[noparse][[/noparse] ] Let's connect the motor to pin 1, it's a 6V motor so it should be fine.
[noparse][[/noparse] ] OK, I got my resistors hooked up with the LEDs.
[noparse][[/noparse]X] I got the Motor hooked up with the H-bridge and the 555 is supplying the PWM.
[noparse][[/noparse] ] Now, if I can only program the BOE-BOT to interface with he Flux Capacitor.
[noparse][[/noparse] ] I dream in SX28 assembler...
/Bamse
I set up a scanline with 2560 clocks in the middle and used up the reminder clocks on either side.
Then a simple,
mov VSCL, scanlines
waitvid My_Palette, My_Pixel_Data ' Four color palette and 16 pixels...
scanlines long 2560 ' No clocks per pixels in the VSCL, only 2560 clocks in the clocks per frame.
The output was 10 pixels rather than 16, which makes more sense to me...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Living on the planet Earth might be expensive but it includes a free trip around the sun every year...
Experience level:
[noparse][[/noparse] ] Let's connect the motor to pin 1, it's a 6V motor so it should be fine.
[noparse][[/noparse] ] OK, I got my resistors hooked up with the LEDs.
[noparse][[/noparse]X] I got the Motor hooked up with the H-bridge and the 555 is supplying the PWM.
[noparse][[/noparse] ] Now, if I can only program the BOE-BOT to interface with he Flux Capacitor.
[noparse][[/noparse] ] I dream in SX28 assembler...
/Bamse