From e2d0b72d8af9ea2d72be985260f7eee42d71ddbd Mon Sep 17 00:00:00 2001 From: Bobbi Webber-Manners Date: Wed, 21 Dec 2022 00:21:16 -0500 Subject: [PATCH] Cleaning up HGR code in preparation for SHR. --- applecorn.po | Bin 819200 -> 819200 bytes applecorn.s | 4 ++-- auxmem.gfx.s => auxmem.hgr.s | 24 ++++++++++++++++++++++-- auxmem.vdu.s | 16 ---------------- mainmem.gfx.s => mainmem.hgr.s | 5 +++-- 5 files changed, 27 insertions(+), 22 deletions(-) rename auxmem.gfx.s => auxmem.hgr.s (92%) rename mainmem.gfx.s => mainmem.hgr.s (98%) diff --git a/applecorn.po b/applecorn.po index 08f0677b1ca6fe8301193c9136077a9041284e02..96f29ff22d8fd2ab46850f19f52423821d8cca73 100644 GIT binary patch delta 389 zcmXxdy-Pw-7{_tX@uvAi6qs2}H_C`!h8%*Rlp+VgpaPaB?W9bA3Tu zqH7>X1~+kNC|uOi)3tM=DVmF*KcKEq!v~%({NRygw=BDJYeM_Uc$di}znjG7aS#$B zApse%!E9)Di@{>B8d?oDEhIqT7!|bpQ`kUgh)gIT&Ajm>)o78P(K~weZP8u&qAuy( zjj*1fx75Qn*a5p>vn)r8dYKP!FISnLezFlB)#Kzrfo)_Z-WVLAcT$hRItj+XGx^iV zDmbcQak(L7Gq@VVU&3bwO97wW%ml7EvMR1BxYjAUp8vO`6o-9bj)@uKPrxu*COZij z6ueAyl6V5HZ7a`XCERHir^r$g`fb6#oYulgP!QszF9kj{PNWpLE$3V|i+e;#!6hDj zA@gaNa2U@)?I~#WO%)%~!cBeEboiw0rs36&C|SsZ!&c=F{E^pqUE9jTN-uJejxsnS M9~IC(DsA@sFT`1<(*OVf delta 377 zcmX}iPbhEhgW^x_0cqsrg>5`tRmE;xNX{#O)ZYq09y|* zVxbnhrPw7Fho#g~W^oz;27}w=&bZuxIYK(HMF)T9w~TUwpYlC^!H>UcgjY<7CDC|~ zBEd6!)C`(o^UNGGQ#>yoWxMprbF-f_*)8`)3U75-Ahp;PhAr}g`7q3)KMo3dccH6I zc}VJX^N^~G_x@yp-h}BV`$$m#;DjhV9~!S{m0caeo+#8gr~h)qn2mx?$Op0*^pRd1h=Ip(DmA+r!e9)J zXsN*FIJDqF9Nfl694=hs9f#APIG^ORe37s6&6rQaR5kHpYF<7tSQ0 A{r~^~ diff --git a/applecorn.s b/applecorn.s index adc2778..446ba4b 100644 --- a/applecorn.s +++ b/applecorn.s @@ -265,7 +265,7 @@ MAINZP MAC PUT AUXMEM.MOSEQU PUT AUXMEM.INIT PUT AUXMEM.VDU - PUT AUXMEM.GFX + PUT AUXMEM.HGR PUT AUXMEM.HOSTFS PUT AUXMEM.OSCLI PUT AUXMEM.BYTWRD @@ -276,7 +276,7 @@ MAINZP MAC PUT MAINMEM.FSEQU PUT MAINMEM.INIT PUT MAINMEM.SVC - PUT MAINMEM.GFX + PUT MAINMEM.HGR PUT MAINMEM.PATH PUT MAINMEM.WILD PUT MAINMEM.LISTS diff --git a/auxmem.gfx.s b/auxmem.hgr.s similarity index 92% rename from auxmem.gfx.s rename to auxmem.hgr.s index 1241359..86c8e6a 100644 --- a/auxmem.gfx.s +++ b/auxmem.hgr.s @@ -1,7 +1,9 @@ -* AUXMEM.GFX.S +* AUXMEM.HGR.S * (c) Bobbi 2021 GPLv3 * -* Graphics operations +* Routines for drawing bitmapped text and graphics in HGR mode (280x192) +* Most of these routines call into MAINMEM.HGR.S to actually do the +* drawing. * * 26-Sep-2021 All graphics screen code moved to here. * 02-Oct-2021 Added temp'y wrapper to HGRPLOT. @@ -32,6 +34,24 @@ PRCHRSOFT CMP #$A0 ; Convert to screen code PUTCHRET >>> ENTAUX RTS + +* Calculate character address in HGR screen memory +* This is the address of the first pixel row of the char +* Add $0400 for each subsequent row of the char +HCHARADDR LDA VDUTEXTY + ASL + TAY + CLC + LDA HGRTAB+0,Y ; LSB of row address + ADC VDUTEXTX + STA VDUADDR+0 + LDA HGRTAB+1,Y ; MSB of row address + ADC #$00 + STA VDUADDR+1 + RTS +* (VDUADDR)=>character address, X=preserved + + * Forwards scroll one line HSCR1LINE >>> WRTMAIN LDX TXTWINLFT diff --git a/auxmem.vdu.s b/auxmem.vdu.s index fb3ec06..595c7a8 100644 --- a/auxmem.vdu.s +++ b/auxmem.vdu.s @@ -462,22 +462,6 @@ CHARADDROK STA VDUBANK * VDUBANK = AppleGS screen bank * CC=auxmem, CS=mainmem, X=preserved -* Calculate character address in HGR screen memory -* This is the address of the first pixel row of the char -* Add $0400 for each subsequent row of the char -HCHARADDR LDA VDUTEXTY - ASL - TAY - CLC - LDA HGRTAB+0,Y ; LSB of row address - ADC VDUTEXTX - STA VDUADDR+0 - LDA HGRTAB+1,Y ; MSB of row address - ADC #$00 - STA VDUADDR+1 - RTS -* (VDUADDR)=>character address, X=preserved - * Move text cursor position *************************** diff --git a/mainmem.gfx.s b/mainmem.hgr.s similarity index 98% rename from mainmem.gfx.s rename to mainmem.hgr.s index 8e80c63..02cd58b 100644 --- a/mainmem.gfx.s +++ b/mainmem.hgr.s @@ -1,7 +1,8 @@ -* MAINMEM.GFX.S +* MAINMEM.HGR.S * (c) Bobbi 2021 GPLv3 * -* Main memory HGR graphics routines. +* Routines for drawing bitmapped text and graphics in HGR mode (280x192) +* Uses the FDraw library to actually do the drawing. * Call FDraw Clear routine CLRHGR >>> ENTMAIN