; Nullbyte - a 256 byte intro ; Released at Stream party 10 ; Copyright (C) Harry "Piru" Sintonen ; ; https://www.pouet.net/prod.php?which=63326 ; include "graphics/rastport.i" include "graphics/gfxbase.i" include "intuition/screens.i" include "hardware/dmabits.i" include "hardware/custom.i" include "all_lvo.i" _custom EQU $dff000 Main: move.l ($170,a2),a6 ; intuitionbase from globvec move.l (ib_ActiveScreen,a6),a5 move.w #(1<<8)|1,(sc_RastPort+rp_Mask,a5) ; speed up rendering / scrolling .gfx move.l (LN_PRED,a6),a6 ; graphics is before intuition, or we crash... move.l (LN_NAME,a6),a0 cmp.w #'gr',(a0) bne.b .gfx move.l (gb_TextFonts+LH_HEAD,a6),a3 cmp.w #8,(tf_YSize,a3) ; if the first font is not topaz/8, the next one is, or we fail beq.b .ok move.l (LN_SUCC,a3),a3 .ok moveq #80+16,d0 add.l (sc_BitMap+bm_Planes+0*4,a5),d0 lea _custom+aud0+ac_ptr,a1 move.l d0,(a1)+ move.w #16,(a1)+ ; ac_len move.l #(3546895/16000)<<16|64,(a1) move.w #DMAF_SETCLR|DMAF_AUD0,(dmacon-(aud0+ac_per),a1) lea (msg,pc),a2 moveq #msglen-1,d7 .mlop moveq #0,d0 move.l (tf_CharLoc,a3),a0 move.b (a2)+,d0 sub.b (tf_LoChar,a3),d0 lsl.w #2,d0 move.w (a0,d0.w),d0 lsr.w #3,d0 move.l (tf_CharData,a3),a4 add.w d0,a4 moveq #8-1,d6 .xlop moveq #2,d0 moveq #5,d1 movem.w (sc_LeftEdge,a5),d2-d5 ; clever hack lea (sc_RastPort,a5),a1 jsr (_LVOScrollRaster,a6) moveq #8-1,d2 lea (msgbuf+16,pc),a0 move.l a4,a1 .ylop moveq #' ',d1 btst d6,(a1) beq.b .putch moveq #'@',d1 .putch move.b d1,-(a0) move.b d1,-(a0) add.w (tf_Modulo,a3),a1 dbf d2,.ylop move.l #(320<<16)|256-2,(sc_RastPort+rp_cp_x,a5) moveq #16,d0 lea (sc_RastPort,a5),a1 jsr (_LVOText,a6) dbf d6,.xlop dbf d7,.mlop msg dc.b 'Nullbyte by Piru. Grts to leet, fuck lamrz' msglen EQU *-msg+10 msgbuf ds.b 16