diff --git a/applecorn.po b/applecorn.po index 0be3bd7..8a6d8d1 100644 Binary files a/applecorn.po and b/applecorn.po differ diff --git a/auxmem.hgr.s b/auxmem.hgr.s index 4d8de35..fb37231 100644 --- a/auxmem.hgr.s +++ b/auxmem.hgr.s @@ -157,24 +157,6 @@ VDU18RET1 >>> ENTAUX >>> WRTAUX RTS -* TEMP * -HGRPLOTTER LDX #3 -HGRPLOTTER1 LDA VDUQ+5,X - PHA - DEX - BPL HGRPLOTTER1 - JSR HGRPLOT - LDX #0 -HGRPLOTTER2 LDA VDUQ+5,X - STA PIXELPLOTX,X - PLA - STA VDUQ+5,X - INX - CPX #4 - BCC HGRPLOTTER2 - RTS -* TEMP * - * Plot actions, PLOT k,x,y * k is in VDUQ+4 * x is in VDUQ+5,VDUQ+6 diff --git a/auxmem.shr.s b/auxmem.shr.s index ecce73b..5780f8d 100644 --- a/auxmem.shr.s +++ b/auxmem.shr.s @@ -301,8 +301,7 @@ SHRPRCH640 SEC * Apply colour masks to 16 bit word of character data * Called in 65816 native mode, 16 bit - MX %00 ; Tell Merlin 16 bit M & X -SHRCOLWORD +SHRCOLWORD MX %00 ; Tell Merlin 16 bit M & X PHA ; Keep A AND SHRCOLMASK ; Mask to set foreground colour STA ZP1 ; Keep foreground diff --git a/auxmem.vdu.s b/auxmem.vdu.s index 5bfe345..a0f2119 100644 --- a/auxmem.vdu.s +++ b/auxmem.vdu.s @@ -1152,13 +1152,36 @@ VDU25BACKUP2 LDA GFXPOSNX,X ; POSN becomes LAST BPL VDU25BACKUP2 LDA VDUPIXELS BEQ :S2 - JSR HGRPLOTTER + JSR GFXPLOTTER :S2 LDA KEYBOARD ; This and PRCHRC need to be EOR #$80 ; made more generalised BMI VDU25EXIT ; No key pressed JSR KBDCHKESC ; Ask KBD to test if Escape VDU25EXIT RTS +* Wrapper around call to HGR/SHR plotting routine +GFXPLOTTER LDX #3 +:L1 LDA VDUQ+5,X + PHA + DEX + BPL :L1 + BIT VDUSCREEN + BPL :S1 + JSR HGRPLOT + BRA GFXPLOTTER2 +:S1 BVC GFXPLOTTER2 + >>> XF2MAIN,SHRPLOT +GFXPLOTRET >>> ENTAUX +GFXPLOTTER2 LDX #0 +:L1 LDA VDUQ+5,X + STA PIXELPLOTX,X + PLA + STA VDUQ+5,X + INX + CPX #4 + BCC :L1 + RTS + * Adjust graphics origin ADJORIG CLC LDA GFXORIGX+0 diff --git a/mainmem.shr.s b/mainmem.shr.s index c710fc0..dcd1e73 100644 --- a/mainmem.shr.s +++ b/mainmem.shr.s @@ -202,6 +202,26 @@ SHRCHAR640 PHY ; Preserve Y RTS +* Plot actions: PLOT k,x,y +* k is in SHRVDUQ+4 +* x is in SHRVDUQ+5,SHRVDUQ+6 +* y is in SHRVDUQ+7,SHRVDUQ+8 +* +* Plot actions: +* $00+x - move/draw lines +* $40+x - plot point +* $50+x - fill triangle +* $60+x - fill rectangle +* $90+x - draw circle +* $98+x - fill circle +* +SHRPLOT >>> ENTMAIN + JSR SHRCOORD ; Convert coordinates +* ... + >>> XF2AUX,GFXPLOTRET + RTS + + * Convert high-resolution screen coordinates * from 1280x1024 to 620x200 or 320x200 * TODO: Totally untested ...