# HG changeset patch
# User JeanDo
# Date 1292081023 -3600
# Node ID 5c7f98fad01a898ae7df46eb2d9786fdc1fee4a3
# Parent 6ee3a42fd00629cc815cd94c91830939ee6f6a24
aa_wordprocessor too fast ?
diff -r 6ee3a42fd006 -r 5c7f98fad01a code_part1/OSTC_code_asm_part1/aa_fonts.asm
--- a/code_part1/OSTC_code_asm_part1/aa_fonts.asm Sat Dec 11 12:34:30 2010 +0100
+++ b/code_part1/OSTC_code_asm_part1/aa_fonts.asm Sat Dec 11 16:23:43 2010 +0100
@@ -1,17 +1,28 @@
;=============================================================================
;
-; file aa_fonts.asm
-; brief Font-data for the (futurly anti-aliased) word processor
-; author JD Gascuel.
+; File aa_fonts.asm
+;
+; Font-data for the anti-aliased word processor
+;
+; This program is free software: you can redistribute it and/or modify
+; it under the terms of the GNU General Public License as published by
+; the Free Software Foundation, either version 3 of the License, or
+; (at your option) any later version.
;
-; copyright (c) 2010, JD Gascuel. All rights reserved.
-; $Id$
+; This program is distributed in the hope that it will be useful,
+; but WITHOUT ANY WARRANTY; without even the implied warranty of
+; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+; GNU General Public License for more details.
+;
+; You should have received a copy of the GNU General Public License
+; along with this program. If not, see .
+;
+; Copyright (c) 2010, JD Gascuel.
;=============================================================================
; HISTORY
; 2010-11-23 : [jDG] Creation with the original 1.72 fonts repacked.
-;
-; BUGS:
-;
+; 2010-12-01 : [jDG] Adding 3bits antialiased fonts.
+;=============================================================================
; Original fonts where byte swapped in PROM memory, but the repacked don't...
; AA_BYTE_SWAP EQU 1
@@ -23,16 +34,17 @@
DB '²', 0x81
DB '°', 0x82
DB '¤', 0x83
- DB 0xB7,0x7F ; Cursor...
- DB 0xB8,0x84 ; Cursor...
+ DB 0xB7,0x7F ; Cursor
+ DB 0xB8,0x84 ; Dimmed cursor.
DB 0 ; End of translation table
DB aa_font28_firstChar ; To be substracted
DB aa_font28_chars ; Max value
- DB 0x83-aa_font28_firstChar ; replace by ? when out.
+ DB 0x83-aa_font28_firstChar; replace by ¤ when unknown.
DB aa_font28_height + 0x80
;
#include "aa_font28_idx.inc" ; SHOULD FOLLOW !
#include "aa_font28.inc"
+aa_font28_end:
; Make sure this is coherent...
if aa_font28_nbbits != 3
error SMALL fount should be encoded with anti-aliasing...
@@ -53,6 +65,7 @@
;
#include "aa_font48_idx.inc"
#include "aa_font48.inc"
+aa_font48_end:
; Make sure this is coherent...
if aa_font48_nbbits != 3
error MEDIUM fount should be encoded with 3bits anti-aliasing...
@@ -70,9 +83,10 @@
;
#include "aa_font90_idx.inc"
#include "aa_font90.inc"
-
-;=============================================================================
+aa_font90_end:
; Make sure this is coherent...
if aa_font90_nbbits != 3
error SMALL fount should be encoded with 3bits anti-aliasing...
endif
+
+;=============================================================================
diff -r 6ee3a42fd006 -r 5c7f98fad01a code_part1/OSTC_code_asm_part1/aa_wordprocessor.asm
--- a/code_part1/OSTC_code_asm_part1/aa_wordprocessor.asm Sat Dec 11 12:34:30 2010 +0100
+++ b/code_part1/OSTC_code_asm_part1/aa_wordprocessor.asm Sat Dec 11 16:23:43 2010 +0100
@@ -1,16 +1,31 @@
;=============================================================================
;
-; file aa_wordprocessor.asm
-; brief Anti-aliased word processor
-; author JD Gascuel.
+; File aa_wordprocessor.asm
+;
+; Anti-aliased word processor
+;
+; This program is free software: you can redistribute it and/or modify
+; it under the terms of the GNU General Public License as published by
+; the Free Software Foundation, either version 3 of the License, or
+; (at your option) any later version.
;
-; copyright (c) 2010, JD Gascuel. All rights reserved.
-; $Id: aa_wordprocessor.asm 72 2010-11-29 22:45:12Z gascuel $
+; This program is distributed in the hope that it will be useful,
+; but WITHOUT ANY WARRANTY; without even the implied warranty of
+; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+; GNU General Public License for more details.
+;
+; You should have received a copy of the GNU General Public License
+; along with this program. If not, see .
+;
+; Copyright (c) 2010, JD Gascuel.
;=============================================================================
; HISTORY
; 2010-11-22 : [jDG] Creation.
+; 2010-12-01 : [jDG] Adding 3bits antialiased fonts.
;
-; BUGS : None known yet...
+; BUGS :
+; * If the three fonts are not in the same half of the PROM memory, TBLPTRU
+; will be badly set, and font48 or font90 will display giberish...
;=============================================================================
;
; MEMORY FOOTPRINT:
@@ -266,21 +281,20 @@
; Trashed: PROD
;
aa_box_cmd:
+ AA_CMD_WRITE 0x35 ; this is the left border
movf win_leftx2,W,BANKED ; Compute left = 2*leftx2
mullw 2
- AA_CMD_WRITE 0x35 ; this is the left border
AA_DATA_WRITE_PROD
movf aa_width,W,BANKED ; right = left + width - 1
addwf PRODL,F,A
movf aa_width+1,W,BANKED
addwfc PRODH,F,A
+ AA_CMD_WRITE 0x36 ; Write and the right border
decf PRODL,F,A ; decrement result
bc aa_box_cmd_1 ; No borrow (/Carry) ? skip propagating.
decf PRODH,F,A
aa_box_cmd_1:
-
- AA_CMD_WRITE 0x36 ; Write and the right border
AA_DATA_WRITE_PROD
movf win_top,W,BANKED ; Write top / bottom window
@@ -289,16 +303,18 @@
decf WREG,A
movwf PRODL,A ; And PRODL is later...
AA_CMD_WRITE 0x37
+ nop
+ nop
AA_DATA_WRITE_PROD
+ AA_CMD_WRITE 0x20
movf win_leftx2,W,BANKED ; Start ptr left
mullw 2
- AA_CMD_WRITE 0x20
AA_DATA_WRITE_PROD
+ AA_CMD_WRITE 0x21
movf win_top,W,BANKED ; Start ptr top
mullw 1 ; Load into PRODH:L
- AA_CMD_WRITE 0x21
AA_DATA_WRITE_PROD
return