;Ram vars Cursor_X equ $00FF0000 ;Ram for X_position Cursor_Y equ $00FF0000+1 ;Ram for Y position ;Video Ports VDP_data equ $C00000 ;VDP data port R/W word or long access only VDP_ctrl equ $C00004 ;VDP control port word or longword writes only ;Header for fusion dc.l $FFFFFE00 ;Mem 4 STAK PTR dc.l ProgramStart ;start of prog dc.l 62,InterruptHandler ;62*InterruptHandler ds.b 256,0 ProgramStart: ;Set up screen lea VDPSettings,a5 ;init screen registers move.l #19,d1 ;number of settings move.w (VDP_ctrl),d0 ;C00004 read vdp status (intrrupt acknowledge?) move.l #00008000,d5 ;VDP Reg command ($8rvv) R=Reg V=new Value NextInitByte: move.b (a5)+,d5 ;get next video control byte move.w d5,(VDP_ctrl) ;c00004 senda write register command to VDP. 8RVV - R=Reg V=Value add.w #$0100,d5 ;point to next VDP register dbra d1,NextInitByte ;loop for rest of block ;Define palette (%----BBB-GGG-RRR-) move.l #$C0000000,VDP_ctrl ;Color 0 move.w #%0000011000000000,VDP_data move.l #$C0020000,VDP_ctrl ;Color 1 move.w #%0000000011191110,VDP_data ;Setup Font lea Font, a1 ; Font Address in ROM move.l #26*8*4,d6 ;our font contains 26 8 line 4 bytes per line move.l #$44200000,(VDP_ctrl) ;start writes to address $0420 ;patterns in vram NextFont: move.b (a1)+,d0 ;Get byte from font moveq.l #7,d5 ;bit count (eight bits) clr.l d1 ;Reset buildup byte Font_NextBit: ;1 color per nibble = 4 bytes rol.l#3,d1 InterruptHandler: ;Basic interrupt handler rte Font: dc.b $18,$3C,$66,$66,$7E,$66,$24,$00 ;A dc.b $3C,$66,$66,$7C,$66,$66,$3C,$00 ;B dc.b $38,$7C,$C0,$C0,$C0,$7C,$38,$00 ;C dc.b $3C,$64,$66,$66,$66,$64,$38,$00 ;D dc.b $00,$00,$00,$00,$00,$00,$00,$00 ;E dc.b $00,$00,$00,$00,$00,$00,$00,$00 ;F dc.b $00,$00,$00,$00,$00,$00,$00,$00 ;G dc.b $00,$00,$00,$00,$00,$00,$00,$00 ;H dc.b $00,$00,$00,$00,$00,$00,$00,$00 ;I dc.b $00,$00,$00,$00,$00,$00,$00,$00 ;J dc.b $00,$00,$00,$00,$00,$00,$00,$00 ;K dc.b $00,$00,$00,$00,$00,$00,$00,$00 ;L dc.b $00,$00,$00,$00,$00,$00,$00,$00 ;M dc.b $00,$00,$00,$00,$00,$00,$00,$00 ;N dc.b $00,$00,$00,$00,$00,$00,$00,$00 ;O dc.b $00,$00,$00,$00,$00,$00,$00,$00 ;P dc.b $00,$00,$00,$00,$00,$00,$00,$00 ;Q dc.b $00,$00,$00,$00,$00,$00,$00,$00 ;R dc.b $00,$00,$00,$00,$00,$00,$00,$00 ;S dc.b $00,$00,$00,$00,$00,$00,$00,$00 ;T dc.b $00,$00,$00,$00,$00,$00,$00,$00 ;U dc.b $00,$00,$00,$00,$00,$00,$00,$00 ;V dc.b $00,$00,$00,$00,$00,$00,$00,$00 ;W dc.b $00,$00,$00,$00,$00,$00,$00,$00 ;X dc.b $00,$00,$00,$00,$00,$00,$00,$00 ;Y dc.b $00,$00,$00,$00,$00,$00,$00,$00 ;Z VDPSettings: dc.b 4,4,$30,$3C,$07,$6C,0,0,0,0,$FF,0,$81,$37,0,2,1,0,0