1 #ifndef CRTCDMAC_H_INCLUDED 2 #define CRTCDMAC_H_INCLUDED 3 4 5 6 extern int crtc_active; /* CRTC�ξ��� 0:CRTC��ư 1:CRTC��� */ 7 extern int crtc_intr_mask; /* CRTC�γ���ޥ��� ==3 ��ɽ�� */ 8 extern int crtc_cursor[2]; /* ����������� ��ɽ���λ���(-1,-1) */ 9 extern byte crtc_format[5]; /* CRTC �������Υե����ޥå� */ 10 11 extern int crtc_reverse_display; /* ����ȿžɽ�� / �����̾�ɽ�� */ 12 extern int crtc_skip_line; /* ����1�����Ф�ɽ�� / �����̾� */ 13 extern int crtc_cursor_style; /* �֥�å� / ������饤�� */ 14 extern int crtc_cursor_blink; /* �������Ǥ��� �������Ǥ��ʤ� */ 15 extern int crtc_attr_non_separate; /* ����VRAM��ATTR ����ߤ��¤� */ 16 extern int crtc_attr_color; /* ���ĥ��顼 ������� */ 17 extern int crtc_attr_non_special; /* ���ĹԤν���� ATTR ���¤� */ 18 19 extern int CRTC_SZ_LINES; /* ɽ�������� (20/25) */ 20 #define CRTC_SZ_COLUMNS (80) /* ɽ������Կ� (80����) */ 21 extern int crtc_sz_lines; /* ��� (20��25) */ 22 extern int crtc_sz_columns; /* �Կ� (2��80) */ 23 extern int crtc_sz_attrs; /* °���� (1��20) */ 24 extern int crtc_byte_per_line; /* 1�Ԥ�����Υ��� �Х��ȿ� */ 25 extern int crtc_font_height; /* �ե���Ȥι⤵ �ɥåȿ�(8/10)*/ 26 27 28 extern pair dmac_address[4]; 29 extern pair dmac_counter[4]; 30 #define text_dma_addr dmac_address[2] 31 32 extern int dmac_mode; 33 34 35 36 /**** �ƥ�����ɽ�� ****/ 37 38 enum { 39 TEXT_DISABLE, /* �ƥ�����ɽ���ʤ� */ 40 TEXT_ATTR_ONLY, /* �� â��°���Τ�ͭ�� (�������ե��å���) */ 41 TEXT_ENABLE, /* �ƥ�����ɽ������ */ 42 End_of_TEXT 43 }; 44 extern int text_display; /* �ƥ�����ɽ�����֥ե饰 */ 45 extern int blink_cycle; /* ���Ǥμ��� 8/16/24/32 */ 46 extern int blink_counter; /* �������楫���� */ 47 48 49 void set_text_display(void); 50 51 52 53 extern int dma_wait_count; /* DMA�Ǿ��륵������� */ 54 55 #define SET_DMA_WAIT_COUNT() dma_wait_count = \ 56 crtc_byte_per_line * crtc_sz_lines 57 58 #define RESET_DMA_WAIT_COUNT() dma_wait_count = 0 59 60 61 62 /* �ƥ����Ƚ��� */ 63 64 extern int text_attr_flipflop; 65 extern Ushort text_attr_buf[2][2048]; 66 67 typedef union{ 68 bit8 b[12]; 69 bit32 l[3]; 70 } T_GRYPH; 71 72 void get_font_gryph( int attr, T_GRYPH *gryph, int *color ); 73 void crtc_make_text_attr( void ); 74 75 76 77 void crtc_init( void ); 78 79 void crtc_out_command( byte data ); 80 void crtc_out_parameter( byte data ); 81 byte crtc_in_status( void ); 82 byte crtc_in_parameter( void ); 83 84 85 void dmac_init( void ); 86 87 void dmac_out_mode( byte data ); 88 byte dmac_in_status( void ); 89 void dmac_out_address( byte addr, byte data ); 90 void dmac_out_counter( byte addr, byte data ); 91 byte dmac_in_address( byte addr ); 92 byte dmac_in_counter( byte addr ); 93 94 95 96 97 98 #undef SUPPORT_CRTC_SEND_SYNC_SIGNAL 99 100 #ifdef SUPPORT_CRTC_SEND_SYNC_SIGNAL 101 102 void crtc_send_sync_signal( int flag ); 103 #define set_crtc_sync_bit() crtc_send_sync_signal( 1 ) 104 #define clr_crtc_sync_bit() crtc_send_sync_signal( 0 ) 105 106 #else 107 108 #define set_crtc_sync_bit() ((void)0) 109 #define clr_crtc_sync_bit() ((void)0) 110 111 #endif 112 113 114 #endif /* CRTCDMAC_H_INCLUDED */ 115