I have been reading the 4 Chapters of Rich Tutorials and surely have a better understanding now of the whole structure, banks etc. Still struggling with reading through the ASM Codes on the Demos provided in MagicKit but this is mostly because of yet unknown EQU.
What I am doing is working with the STARWAVE Code (seems to be covering the most things at once) and trying to change things etc.
I have stripped out everything but the scroller and it works fine so far. Two things I am not really clear what they do though - maybe somebody here can help:
Code: Select all
; set interrupt vector
setvec #HSYNC,hsync_proc
vec_on #HSYNC
smb #7,<irq_m
; enable HSYNC interrupt
vreg #5
lda #$cc
sta video_data_l
sta vdc_crl
What I am not sure is the next part.
vreg #05 - i assume that this is that register (taken from chapter_0.txt on the tutorials)
$05 - (CR) The control register is used to enable/disabled BG or sprites,
auto incrementor, Vblank/hblank/sprite overflow/collision flags.
Why do I write #$CC into video_data_l which is the Data Port (if I am correct)? and the same value to $20F3? It says its the VDC Control Register in EQU.INC?
And my second question is about this routine:
Code: Select all
vsync_proc:
vreg #6 ; restart the scanline counter on the first
stw #$40,video_data ; line
stw #$40,<scanline
rts
why does this store a word and not a byte?
Thank you and sorry if this might sound like a really lame question
Roland