7 movea.l #def_reg_tab, %a0
11 move.w %d0, VDP_CTL_PORT | VDP_CTL = 0x8000 | (reg << 8) | val
15 movea.l #VDP_DATA_PORT, %a0
20 move.l #0x7fff, %d1 | 64k / 2 - 1
28 move.l #63, %d1 | 4 palettes * 16 col * 2 bytes / 2 - 1
33 move.l #VDP_VSRAM, %d1
36 move.l #39, %d1 | 80 bytes / 2 - 1
41 | address in d0, type in d1
47 move.l %d0, VDP_CTL_PORT
52 move.l 4(%sp), %d0 | palette number
54 add.l 8(%sp), %d0 | add index
58 move.w 22(%sp), %d0 | blue
60 or.w 18(%sp), %d0 | green
62 or.w 14(%sp), %d0 | red
64 move.w %d0, VDP_DATA_PORT
69 .byte VDP_REG_MODE1, VDP_M1_INIT | 0: mode 1
70 .byte VDP_REG_MODE2, VDP_M2_INIT + VDP_M2_DISP | 1: mode 2
71 .byte VDP_REG_NAMEA, VDP_NA_ADDR(0xc000) | 2: scroll A nametable addr.
72 .byte VDP_REG_NAMEW, 0 | 3: window nametable addr.
73 .byte VDP_REG_NAMEB, VDP_NB_ADDR(0xe000) | 4: scroll B nametable addr.
74 .byte VDP_REG_SPR, VDP_SPRTAB_ADDR(0xd000) | 5: sprite table addr.
75 .byte VDP_REG_BGCOL, 0 | 7: bg color
76 .byte VDP_REG_HINTR, 0 | 10: horiz. interrupt interval
77 .byte VDP_REG_MODE3, 0 | 11: mode 3
78 .byte VDP_REG_MODE4, VDP_M4_H40 | 12: mode 4
79 .byte VDP_REG_HSCROLL, VDP_HSTAB_ADDR(0xf000) | 13: hscroll table addr.
80 .byte VDP_REG_AUTOINC, 2 | 15: autoincrement 2 bytes
81 .byte VDP_REG_SCROLLSZ, VDP_SCR_H64 | 16: scroll size (64x32)
82 .byte VDP_REG_WINX, 0, VDP_REG_WINY, 0 | 17,18: win x/y pos
83 | zeroing the DMA registers at this point causes the real machine to
85 |.byte VDP_REG_DMACNTL, 0, VDP_REG_DMACNTH, 0 | 19-23: DMA regs
86 |.byte VDP_REG_DMASRCL, 0, VDP_REG_DMASRCM, 0, VDP_REG_DMASRCH, 0