diff --git a/applecorn.po b/applecorn.po index 893cc31..22b7713 100644 Binary files a/applecorn.po and b/applecorn.po differ diff --git a/applecorn.s b/applecorn.s index af32207..6da0007 100644 --- a/applecorn.s +++ b/applecorn.s @@ -95,6 +95,7 @@ RD80VID EQU $C01F TBCOLOR EQU $C022 ; GS-specific, used but commented out KEYMOD EQU $C025 ; GS-specific +NEWVIDEO EQU $C029 ; GS-specific, new video register SPKR EQU $C030 CLOCKCTL EQU $C034 ; GS-specific, Clock control register diff --git a/auxmem.hgr.s b/auxmem.hgr.s index e2aeeb9..abb05df 100644 --- a/auxmem.hgr.s +++ b/auxmem.hgr.s @@ -19,6 +19,8 @@ HGRVDU22 JSR VDU12 ; Clear text and HGR screen STA GRON ; Enable Graphics STA PAGE1 ; PAGE1 STA CLR80VID ; Select 40col text + LDA #$80 ; Most significant bit + TRB NEWVIDEO ; Turn off SHR RTS diff --git a/auxmem.init.s b/auxmem.init.s index 8f4e4c0..f850a84 100644 --- a/auxmem.init.s +++ b/auxmem.init.s @@ -218,6 +218,6 @@ BYTE00 BEQ BYTE00A ; OSBYTE 0,0 - generate error RTS ; %000x1xxx host type, 'A'pple BYTE00A BRK DB $F7 -HELLO ASC 'Applecorn MOS 2022-12-21' +HELLO ASC 'Applecorn MOS 2022-12-22' DB $00 ; Unify MOS messages diff --git a/auxmem.shr.s b/auxmem.shr.s index 4f59f84..0a891c8 100644 --- a/auxmem.shr.s +++ b/auxmem.shr.s @@ -2,7 +2,12 @@ * (c) Bobbi 2022 GPLv3 * * Routines for drawing bitmapped text and graphics in SHR mode -* on Apple IIGS (640x200 4 colour, or 320x200 16 colour. +* on Apple IIGS (640x200 4 colour, or 320x200 16 colour.) * +* Enable SHR mode +SHRVDU22 JSR VDU12 ; Clear text and HGR screen + LDA #$80 ; Most significant bit + TSB NEWVIDEO ; Enable SHR mode + RTS diff --git a/auxmem.vdu.s b/auxmem.vdu.s index 7a710e9..6659624 100644 --- a/auxmem.vdu.s +++ b/auxmem.vdu.s @@ -117,11 +117,11 @@ SCNTXTMAXX DB 79, 39, 39, 79, 39, 39, 39, 39 ; Max text column SCNTXTMAXY DB 23, 23, 23, 23, 23, 23, 23, 23 ; Max text row SCNBYTES DB 08, 08, 08, 01, 01, 01, 01, 01 ; Bytes per character SCNCOLOURS DB 03, 15, 07, 01, 01, 01, 01, 01 ; Colours-1 -SCNPIXELS DB 08, 08, 07, 00, 00, 00, 00, 00 ; Pixels per byte -SCNTYPE DB 32, 32,128, 01, 00, 00, 00, 64 ; Screen type +SCNPIXELS DB 04, 02, 07, 00, 00, 00, 00, 00 ; Pixels per byte +SCNTYPE DB 65, 64,128, 01, 00, 00, 00, 32 ; Screen type * b7=FastDraw -> HGR mode -* b6=Teletext -> No-op -* b5=SHR mode on Apple IIgs +* b6=SHR mode on Apple IIgs +* b5=Teletext * b0=40COL/80COL * Colour table @@ -361,8 +361,9 @@ PUTCHRC PHA BNE PRCHR4 CPX #$20 BCS PRCHR3 ; Not $80-$9F + LDA #$20 BIT VDUSCREEN - BVC PRCHR3 ; Not teletext + BEQ PRCHR3 ; Not teletext LDX #$E0 ; Convert $80-$9F to space PRCHR3 TXA EOR #$40 @@ -593,15 +594,20 @@ VDU22 LDA VDUQ+8 JSR VDU20 ; Default colours JSR VDU26 ; Default windows STA FULLGR ; Clear MIXED mode - LDA VDUSCREEN + BIT VDUSCREEN BPL :NOTHGR - JMP HGRVDU22 ; b7=1, graphics mode -:NOTHGR AND #$01 ; 40col/80col bit + JMP HGRVDU22 ; b7=1, HGR mode +:NOTHGR BVC :NOTSHR + JMP SHRVDU22 ; b6=1, SHR mode +:NOTSHR LDA VDUSCREEN + AND #$01 ; 40col/80col bit TAX STA CLR80VID,X ; Select 40col/80col STA TEXTON ; Enable Text STA PAGE2 ; PAGE2 STA SETALTCHAR ; Enable alt charset + LDA #$80 ; Most significant bit + TRB NEWVIDEO ; Turn off SHR * Fall through into CLS