8 movea.l #def_reg_tab, %a0
14 move.w %d0, VDP_CTL_PORT | VDP_CTL = 0x8000 | (reg << 8) | val
16 cmp.w def_reg_tab_size, %d1
20 movea.l #VDP_DATA_PORT, %a0
25 move.l #0x7fff, %d1 | 64k / 2 - 1
33 move.l #63, %d1 | 4 palettes * 16 col * 2 bytes / 2 - 1
38 move.l #VDP_VSRAM, %d1
41 move.l #39, %d1 | 80 bytes / 2 - 1
46 | address in d0, type in d1
52 move.l %d0, VDP_CTL_PORT
57 move.l 4(%sp), %d0 | palette number
59 add.l 8(%sp), %d0 | add index
62 move.w 22(%sp), %d0 | blue
64 or.w 18(%sp), %d0 | green
66 or.w 14(%sp), %d0 | red
68 move.w %d0, VDP_DATA_PORT
73 .byte VDP_M1_INIT | 0: mode 1
74 .byte VDP_M2_INIT + VDP_M2_DISP | 1: mode 2
75 .byte VDP_NA_ADDR(0xc000) | 2: scroll A nametable addr.
76 .byte 0 | 3: window nametable addr.
77 .byte VDP_NB_ADDR(0xd000) | 4: scroll B nametable addr.
78 .byte VDP_SPRTAB_ADDR(0xe000) | 5: sprite table addr.
82 .byte 0 | 10: horiz. interrupt interval
84 .byte VDP_M4_H40 | 12: mode 4
85 .byte VDP_HSTAB_ADDR(0xf000) | 13: hscroll table addr.
87 .byte 2 | 15: autoincrement 2 bytes
88 .byte VDP_SCR_H64 | 16: scroll size (64x32)
89 .byte 0, 0 | 17,18: win x/y pos
90 .byte 0, 0, 0, 0, 0 | 19-23: DMA regs
94 .word def_reg_tab_end - def_reg_tab