Cleaning up HGR code in preparation for SHR.

This commit is contained in:
Bobbi Webber-Manners 2022-12-21 00:21:16 -05:00
parent 02a88a5088
commit e2d0b72d8a
5 changed files with 27 additions and 22 deletions

Binary file not shown.

View File

@ -265,7 +265,7 @@ MAINZP MAC
PUT AUXMEM.MOSEQU PUT AUXMEM.MOSEQU
PUT AUXMEM.INIT PUT AUXMEM.INIT
PUT AUXMEM.VDU PUT AUXMEM.VDU
PUT AUXMEM.GFX PUT AUXMEM.HGR
PUT AUXMEM.HOSTFS PUT AUXMEM.HOSTFS
PUT AUXMEM.OSCLI PUT AUXMEM.OSCLI
PUT AUXMEM.BYTWRD PUT AUXMEM.BYTWRD
@ -276,7 +276,7 @@ MAINZP MAC
PUT MAINMEM.FSEQU PUT MAINMEM.FSEQU
PUT MAINMEM.INIT PUT MAINMEM.INIT
PUT MAINMEM.SVC PUT MAINMEM.SVC
PUT MAINMEM.GFX PUT MAINMEM.HGR
PUT MAINMEM.PATH PUT MAINMEM.PATH
PUT MAINMEM.WILD PUT MAINMEM.WILD
PUT MAINMEM.LISTS PUT MAINMEM.LISTS

View File

@ -1,7 +1,9 @@
* AUXMEM.GFX.S * AUXMEM.HGR.S
* (c) Bobbi 2021 GPLv3 * (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. * 26-Sep-2021 All graphics screen code moved to here.
* 02-Oct-2021 Added temp'y wrapper to HGRPLOT. * 02-Oct-2021 Added temp'y wrapper to HGRPLOT.
@ -32,6 +34,24 @@ PRCHRSOFT CMP #$A0 ; Convert to screen code
PUTCHRET >>> ENTAUX PUTCHRET >>> ENTAUX
RTS 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 * Forwards scroll one line
HSCR1LINE >>> WRTMAIN HSCR1LINE >>> WRTMAIN
LDX TXTWINLFT LDX TXTWINLFT

View File

@ -462,22 +462,6 @@ CHARADDROK STA VDUBANK
* VDUBANK = AppleGS screen bank * VDUBANK = AppleGS screen bank
* CC=auxmem, CS=mainmem, X=preserved * 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 * Move text cursor position
*************************** ***************************

View File

@ -1,7 +1,8 @@
* MAINMEM.GFX.S * MAINMEM.HGR.S
* (c) Bobbi 2021 GPLv3 * (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 * Call FDraw Clear routine
CLRHGR >>> ENTMAIN CLRHGR >>> ENTMAIN