mirror of
https://github.com/dschmenk/PLASMA.git
synced 2025-01-10 21:30:04 +00:00
HGR tile and font libraries
This commit is contained in:
parent
31f4fbfbec
commit
8d9a0889a6
@ -7,8 +7,7 @@ import dgrlib
|
||||
predef dgrTileStr(x, y, tilestr, strlen, tilebuff)#0
|
||||
predef dgrFill(x, y, tile)#0
|
||||
predef dgrClear(clr)#0
|
||||
predef dgrMode#1
|
||||
predef txtMode#0
|
||||
predef dgrMode(mode)#1
|
||||
predef dgrShow(page)#1
|
||||
predef dgrSwap#0
|
||||
predef dgrDrawBuf(page)#0
|
||||
|
@ -7,8 +7,7 @@ import grlib
|
||||
predef grTileStr(x, y, tilestr, strlen, tilebuff)#0
|
||||
predef grFill(x, y, tile)#0
|
||||
predef grClear(clr)#0
|
||||
predef grMode#1
|
||||
predef txtMode#0
|
||||
predef grMode(mode)#1
|
||||
predef grShow(page)#1
|
||||
predef grSwap#0
|
||||
predef grDrawBuf(page)#0
|
||||
|
3
src/inc/hgrfont.plh
Normal file
3
src/inc/hgrfont.plh
Normal file
@ -0,0 +1,3 @@
|
||||
import hgrfont
|
||||
predef hgrPutStr(x, y, strptr)#0
|
||||
end
|
@ -15,8 +15,7 @@ import hgrlib
|
||||
predef hgrXorSrc(ofst, y, w, h, srcptr)#0
|
||||
predef hgrOrSrc(ofst, y, w, h, srcptr)#0
|
||||
predef hgrCopyDst(ofst, y, w, h, dstptr)#0
|
||||
predef hgrMode#1
|
||||
predef txtMode#0
|
||||
predef hgrMode(mode)#1
|
||||
predef hgrClear#0
|
||||
predef hgrShow(page)#1
|
||||
predef hgrSwap#1
|
||||
|
13
src/inc/hgrtile.plh
Normal file
13
src/inc/hgrtile.plh
Normal file
@ -0,0 +1,13 @@
|
||||
import hgrtile
|
||||
predef tileDraw(x, y, tileptr)#0
|
||||
predef tileXorDraw(x, y, tileptr)#0
|
||||
predef tileOrDraw(x, y, tileptr)#0
|
||||
predef tileAndDraw(x, y, tileptr)#0
|
||||
predef tileDrawStr(x, y, strptr, strlen, tileset)#0
|
||||
predef tileFromText(txtpage, tileset)#0
|
||||
predef tileMode(mode)#1
|
||||
predef tileClear#0
|
||||
predef tileShow(page)#1
|
||||
predef tileSwap#1
|
||||
predef tileDrawBuf(page)#1
|
||||
end
|
@ -535,25 +535,25 @@ export def dgrClear(clr)#0
|
||||
memset(@clrtile, clr, 32)
|
||||
dgrFill(0, 0, @clrtile)
|
||||
end
|
||||
//
|
||||
// Set double lores graphics, return draw buffer
|
||||
//
|
||||
export def dgrMode#1
|
||||
^showlores
|
||||
^showfull
|
||||
^showgraphics
|
||||
^showpage1
|
||||
^ena80 = 0
|
||||
^show80 = 0
|
||||
^an3on
|
||||
drawpage = 1
|
||||
drawbuff = dgrbuff[1]
|
||||
return 1
|
||||
end
|
||||
//
|
||||
// Set text mode
|
||||
//
|
||||
export def txtMode#0
|
||||
export def dgrMode(mode)#1
|
||||
if mode
|
||||
//
|
||||
// Set double lores graphics, return draw buffer
|
||||
//
|
||||
^showlores
|
||||
^showfull
|
||||
^showgraphics
|
||||
^showpage1
|
||||
^ena80 = 0
|
||||
^show80 = 0
|
||||
^an3on
|
||||
drawpage = 1
|
||||
drawbuff = dgrbuff[1]
|
||||
return 1
|
||||
fin
|
||||
//
|
||||
// Set text mode
|
||||
//
|
||||
^showtext
|
||||
^showpage1
|
||||
^ena80 = 0
|
||||
@ -561,6 +561,7 @@ export def txtMode#0
|
||||
^mapmain = 0
|
||||
^an3off
|
||||
call($FC58, 0, 0, 0, 0) // home()
|
||||
return 0
|
||||
end
|
||||
//
|
||||
// Set display page, return other page
|
||||
|
@ -420,23 +420,26 @@ end
|
||||
//
|
||||
// Set lores graphics, return draw buffer
|
||||
//
|
||||
export def grMode#1
|
||||
^showlores
|
||||
^showfull
|
||||
^showgraphics
|
||||
^showpage1
|
||||
^ena80 = 0
|
||||
^show40 = 0
|
||||
^mapmain = 0
|
||||
^an3off
|
||||
drawpage = 1
|
||||
drawbuff = grbuff[1]
|
||||
return 1
|
||||
end
|
||||
//
|
||||
// Set text mode
|
||||
//
|
||||
export def txtMode#0
|
||||
export def grMode(mode)#1
|
||||
if mode
|
||||
//
|
||||
// Set GR mode
|
||||
//
|
||||
^showlores
|
||||
^showfull
|
||||
^showgraphics
|
||||
^showpage1
|
||||
^ena80 = 0
|
||||
^show40 = 0
|
||||
^mapmain = 0
|
||||
^an3off
|
||||
drawpage = 1
|
||||
drawbuff = grbuff[1]
|
||||
return 1
|
||||
fin
|
||||
//
|
||||
// Set text mode
|
||||
//
|
||||
^showtext
|
||||
^showpage1
|
||||
^ena80 = 0
|
||||
@ -444,6 +447,7 @@ export def txtMode#0
|
||||
^mapmain = 0
|
||||
^an3off
|
||||
call($FC58, 0, 0, 0, 0) // home()
|
||||
return 0
|
||||
end
|
||||
//
|
||||
// Set display page, return other page
|
||||
|
140
src/libsrc/apple/hgrfont.pla
Normal file
140
src/libsrc/apple/hgrfont.pla
Normal file
@ -0,0 +1,140 @@
|
||||
include "inc/hgrtile.plh"
|
||||
//
|
||||
// Apple //e hires character font
|
||||
//
|
||||
byte hgrFont[]
|
||||
byte = $1C,$22,$2A,$3A,$1A,$02,$3C,$00,$08,$14,$22,$22,$3E,$22,$22,$00
|
||||
byte = $1E,$22,$22,$1E,$22,$22,$1E,$00,$1C,$22,$02,$02,$02,$22,$1C,$00
|
||||
byte = $1E,$22,$22,$22,$22,$22,$1E,$00,$3E,$02,$02,$1E,$02,$02,$3E,$00
|
||||
byte = $3E,$02,$02,$1E,$02,$02,$02,$00,$3C,$02,$02,$02,$32,$22,$3C,$00
|
||||
byte = $22,$22,$22,$3E,$22,$22,$22,$00,$1C,$08,$08,$08,$08,$08,$1C,$00
|
||||
byte = $20,$20,$20,$20,$20,$22,$1C,$00,$22,$12,$0A,$06,$0A,$12,$22,$00
|
||||
byte = $02,$02,$02,$02,$02,$02,$3E,$00,$22,$36,$2A,$2A,$22,$22,$22,$00
|
||||
byte = $22,$22,$26,$2A,$32,$22,$22,$00,$1C,$22,$22,$22,$22,$22,$1C,$00
|
||||
byte = $1E,$22,$22,$1E,$02,$02,$02,$00,$1C,$22,$22,$22,$2A,$12,$2C,$00
|
||||
byte = $1E,$22,$22,$1E,$0A,$12,$22,$00,$1C,$22,$02,$1C,$20,$22,$1C,$00
|
||||
byte = $3E,$08,$08,$08,$08,$08,$08,$00,$22,$22,$22,$22,$22,$22,$1C,$00
|
||||
byte = $22,$22,$22,$22,$22,$14,$08,$00,$22,$22,$22,$2A,$2A,$36,$22,$00
|
||||
byte = $22,$22,$14,$08,$14,$22,$22,$00,$22,$22,$14,$08,$08,$08,$08,$00
|
||||
byte = $3E,$20,$10,$08,$04,$02,$3E,$00,$3E,$06,$06,$06,$06,$06,$3E,$00
|
||||
byte = $00,$02,$04,$08,$10,$20,$00,$00,$3E,$30,$30,$30,$30,$30,$3E,$00
|
||||
byte = $00,$00,$08,$14,$22,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$7F
|
||||
byte = $00,$00,$00,$00,$00,$00,$00,$00,$08,$08,$08,$08,$08,$00,$08,$00
|
||||
byte = $14,$14,$14,$00,$00,$00,$00,$00,$14,$14,$3E,$14,$3E,$14,$14,$00
|
||||
byte = $08,$3C,$0A,$1C,$28,$1E,$08,$00,$06,$26,$10,$08,$04,$32,$30,$00
|
||||
byte = $04,$0A,$0A,$04,$2A,$12,$2C,$00,$08,$08,$08,$00,$00,$00,$00,$00
|
||||
byte = $08,$04,$02,$02,$02,$04,$08,$00,$08,$10,$20,$20,$20,$10,$08,$00
|
||||
byte = $08,$2A,$1C,$08,$1C,$2A,$08,$00,$00,$08,$08,$3E,$08,$08,$00,$00
|
||||
byte = $00,$00,$00,$00,$08,$08,$04,$00,$00,$00,$00,$3E,$00,$00,$00,$00
|
||||
byte = $00,$00,$00,$00,$00,$00,$08,$00,$00,$20,$10,$08,$04,$02,$00,$00
|
||||
byte = $1C,$22,$32,$2A,$26,$22,$1C,$00,$08,$0C,$08,$08,$08,$08,$1C,$00
|
||||
byte = $1C,$22,$20,$18,$04,$02,$3E,$00,$3E,$20,$10,$18,$20,$22,$1C,$00
|
||||
byte = $10,$18,$14,$12,$3E,$10,$10,$00,$3E,$02,$1E,$20,$20,$22,$1C,$00
|
||||
byte = $38,$04,$02,$1E,$22,$22,$1C,$00,$3E,$20,$10,$08,$04,$04,$04,$00
|
||||
byte = $1C,$22,$22,$1C,$22,$22,$1C,$00,$1C,$22,$22,$3C,$20,$10,$0E,$00
|
||||
byte = $00,$00,$08,$00,$08,$00,$00,$00,$00,$00,$08,$00,$08,$08,$04,$00
|
||||
byte = $10,$08,$04,$02,$04,$08,$10,$00,$00,$00,$3E,$00,$3E,$00,$00,$00
|
||||
byte = $04,$08,$10,$20,$10,$08,$04,$00,$1C,$22,$10,$08,$08,$00,$08,$00
|
||||
byte = $1C,$22,$2A,$3A,$1A,$02,$3C,$00,$08,$14,$22,$22,$3E,$22,$22,$00
|
||||
byte = $1E,$22,$22,$1E,$22,$22,$1E,$00,$1C,$22,$02,$02,$02,$22,$1C,$00
|
||||
byte = $1E,$22,$22,$22,$22,$22,$1E,$00,$3E,$02,$02,$1E,$02,$02,$3E,$00
|
||||
byte = $3E,$02,$02,$1E,$02,$02,$02,$00,$3C,$02,$02,$02,$32,$22,$3C,$00
|
||||
byte = $22,$22,$22,$3E,$22,$22,$22,$00,$1C,$08,$08,$08,$08,$08,$1C,$00
|
||||
byte = $20,$20,$20,$20,$20,$22,$1C,$00,$22,$12,$0A,$06,$0A,$12,$22,$00
|
||||
byte = $02,$02,$02,$02,$02,$02,$3E,$00,$22,$36,$2A,$2A,$22,$22,$22,$00
|
||||
byte = $22,$22,$26,$2A,$32,$22,$22,$00,$1C,$22,$22,$22,$22,$22,$1C,$00
|
||||
byte = $1E,$22,$22,$1E,$02,$02,$02,$00,$1C,$22,$22,$22,$2A,$12,$2C,$00
|
||||
byte = $1E,$22,$22,$1E,$0A,$12,$22,$00,$1C,$22,$02,$1C,$20,$22,$1C,$00
|
||||
byte = $3E,$08,$08,$08,$08,$08,$08,$00,$22,$22,$22,$22,$22,$22,$1C,$00
|
||||
byte = $22,$22,$22,$22,$22,$14,$08,$00,$22,$22,$22,$2A,$2A,$36,$22,$00
|
||||
byte = $22,$22,$14,$08,$14,$22,$22,$00,$22,$22,$14,$08,$08,$08,$08,$00
|
||||
byte = $3E,$20,$10,$08,$04,$02,$3E,$00,$3E,$06,$06,$06,$06,$06,$3E,$00
|
||||
byte = $00,$02,$04,$08,$10,$20,$00,$00,$3E,$30,$30,$30,$30,$30,$3E,$00
|
||||
byte = $00,$00,$08,$14,$22,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$7F
|
||||
byte = $00,$00,$00,$00,$00,$00,$00,$00,$08,$08,$08,$08,$08,$00,$08,$00
|
||||
byte = $14,$14,$14,$00,$00,$00,$00,$00,$14,$14,$3E,$14,$3E,$14,$14,$00
|
||||
byte = $08,$3C,$0A,$1C,$28,$1E,$08,$00,$06,$26,$10,$08,$04,$32,$30,$00
|
||||
byte = $04,$0A,$0A,$04,$2A,$12,$2C,$00,$08,$08,$08,$00,$00,$00,$00,$00
|
||||
byte = $08,$04,$02,$02,$02,$04,$08,$00,$08,$10,$20,$20,$20,$10,$08,$00
|
||||
byte = $08,$2A,$1C,$08,$1C,$2A,$08,$00,$00,$08,$08,$3E,$08,$08,$00,$00
|
||||
byte = $00,$00,$00,$00,$08,$08,$04,$00,$00,$00,$00,$3E,$00,$00,$00,$00
|
||||
byte = $00,$00,$00,$00,$00,$00,$08,$00,$00,$20,$10,$08,$04,$02,$00,$00
|
||||
byte = $1C,$22,$32,$2A,$26,$22,$1C,$00,$08,$0C,$08,$08,$08,$08,$1C,$00
|
||||
byte = $1C,$22,$20,$18,$04,$02,$3E,$00,$3E,$20,$10,$18,$20,$22,$1C,$00
|
||||
byte = $10,$18,$14,$12,$3E,$10,$10,$00,$3E,$02,$1E,$20,$20,$22,$1C,$00
|
||||
byte = $38,$04,$02,$1E,$22,$22,$1C,$00,$3E,$20,$10,$08,$04,$04,$04,$00
|
||||
byte = $1C,$22,$22,$1C,$22,$22,$1C,$00,$1C,$22,$22,$3C,$20,$10,$0E,$00
|
||||
byte = $00,$00,$08,$00,$08,$00,$00,$00,$00,$00,$08,$00,$08,$08,$04,$00
|
||||
byte = $10,$08,$04,$02,$04,$08,$10,$00,$00,$00,$3E,$00,$3E,$00,$00,$00
|
||||
byte = $04,$08,$10,$20,$10,$08,$04,$00,$1C,$22,$10,$08,$08,$00,$08,$00
|
||||
byte = $1C,$22,$2A,$3A,$1A,$02,$3C,$00,$08,$14,$22,$22,$3E,$22,$22,$00
|
||||
byte = $1E,$22,$22,$1E,$22,$22,$1E,$00,$1C,$22,$02,$02,$02,$22,$1C,$00
|
||||
byte = $1E,$22,$22,$22,$22,$22,$1E,$00,$3E,$02,$02,$1E,$02,$02,$3E,$00
|
||||
byte = $3E,$02,$02,$1E,$02,$02,$02,$00,$3C,$02,$02,$02,$32,$22,$3C,$00
|
||||
byte = $22,$22,$22,$3E,$22,$22,$22,$00,$1C,$08,$08,$08,$08,$08,$1C,$00
|
||||
byte = $20,$20,$20,$20,$20,$22,$1C,$00,$22,$12,$0A,$06,$0A,$12,$22,$00
|
||||
byte = $02,$02,$02,$02,$02,$02,$3E,$00,$22,$36,$2A,$2A,$22,$22,$22,$00
|
||||
byte = $22,$22,$26,$2A,$32,$22,$22,$00,$1C,$22,$22,$22,$22,$22,$1C,$00
|
||||
byte = $1E,$22,$22,$1E,$02,$02,$02,$00,$1C,$22,$22,$22,$2A,$12,$2C,$00
|
||||
byte = $1E,$22,$22,$1E,$0A,$12,$22,$00,$1C,$22,$02,$1C,$20,$22,$1C,$00
|
||||
byte = $3E,$08,$08,$08,$08,$08,$08,$00,$22,$22,$22,$22,$22,$22,$1C,$00
|
||||
byte = $22,$22,$22,$22,$22,$14,$08,$00,$22,$22,$22,$2A,$2A,$36,$22,$00
|
||||
byte = $22,$22,$14,$08,$14,$22,$22,$00,$22,$22,$14,$08,$08,$08,$08,$00
|
||||
byte = $3E,$20,$10,$08,$04,$02,$3E,$00,$3E,$06,$06,$06,$06,$06,$3E,$00
|
||||
byte = $00,$02,$04,$08,$10,$20,$00,$00,$3E,$30,$30,$30,$30,$30,$3E,$00
|
||||
byte = $00,$00,$08,$14,$22,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$7F
|
||||
byte = $00,$00,$00,$00,$00,$00,$00,$00,$08,$08,$08,$08,$08,$00,$08,$00
|
||||
byte = $14,$14,$14,$00,$00,$00,$00,$00,$14,$14,$3E,$14,$3E,$14,$14,$00
|
||||
byte = $08,$3C,$0A,$1C,$28,$1E,$08,$00,$06,$26,$10,$08,$04,$32,$30,$00
|
||||
byte = $04,$0A,$0A,$04,$2A,$12,$2C,$00,$08,$08,$08,$00,$00,$00,$00,$00
|
||||
byte = $08,$04,$02,$02,$02,$04,$08,$00,$08,$10,$20,$20,$20,$10,$08,$00
|
||||
byte = $08,$2A,$1C,$08,$1C,$2A,$08,$00,$00,$08,$08,$3E,$08,$08,$00,$00
|
||||
byte = $00,$00,$00,$00,$08,$08,$04,$00,$00,$00,$00,$3E,$00,$00,$00,$00
|
||||
byte = $00,$00,$00,$00,$00,$00,$08,$00,$00,$20,$10,$08,$04,$02,$00,$00
|
||||
byte = $1C,$22,$32,$2A,$26,$22,$1C,$00,$08,$0C,$08,$08,$08,$08,$1C,$00
|
||||
byte = $1C,$22,$20,$18,$04,$02,$3E,$00,$3E,$20,$10,$18,$20,$22,$1C,$00
|
||||
byte = $10,$18,$14,$12,$3E,$10,$10,$00,$3E,$02,$1E,$20,$20,$22,$1C,$00
|
||||
byte = $38,$04,$02,$1E,$22,$22,$1C,$00,$3E,$20,$10,$08,$04,$04,$04,$00
|
||||
byte = $1C,$22,$22,$1C,$22,$22,$1C,$00,$1C,$22,$22,$3C,$20,$10,$0E,$00
|
||||
byte = $00,$00,$08,$00,$08,$00,$00,$00,$00,$00,$08,$00,$08,$08,$04,$00
|
||||
byte = $10,$08,$04,$02,$04,$08,$10,$00,$00,$00,$3E,$00,$3E,$00,$00,$00
|
||||
byte = $04,$08,$10,$20,$10,$08,$04,$00,$1C,$22,$10,$08,$08,$00,$08,$00
|
||||
byte = $1C,$22,$2A,$3A,$1A,$02,$3C,$00,$08,$14,$22,$22,$3E,$22,$22,$00
|
||||
byte = $1E,$22,$22,$1E,$22,$22,$1E,$00,$1C,$22,$02,$02,$02,$22,$1C,$00
|
||||
byte = $1E,$22,$22,$22,$22,$22,$1E,$00,$3E,$02,$02,$1E,$02,$02,$3E,$00
|
||||
byte = $3E,$02,$02,$1E,$02,$02,$02,$00,$3C,$02,$02,$02,$32,$22,$3C,$00
|
||||
byte = $22,$22,$22,$3E,$22,$22,$22,$00,$1C,$08,$08,$08,$08,$08,$1C,$00
|
||||
byte = $20,$20,$20,$20,$20,$22,$1C,$00,$22,$12,$0A,$06,$0A,$12,$22,$00
|
||||
byte = $02,$02,$02,$02,$02,$02,$3E,$00,$22,$36,$2A,$2A,$22,$22,$22,$00
|
||||
byte = $22,$22,$26,$2A,$32,$22,$22,$00,$1C,$22,$22,$22,$22,$22,$1C,$00
|
||||
byte = $1E,$22,$22,$1E,$02,$02,$02,$00,$1C,$22,$22,$22,$2A,$12,$2C,$00
|
||||
byte = $1E,$22,$22,$1E,$0A,$12,$22,$00,$1C,$22,$02,$1C,$20,$22,$1C,$00
|
||||
byte = $3E,$08,$08,$08,$08,$08,$08,$00,$22,$22,$22,$22,$22,$22,$1C,$00
|
||||
byte = $22,$22,$22,$22,$22,$14,$08,$00,$22,$22,$22,$2A,$2A,$36,$22,$00
|
||||
byte = $22,$22,$14,$08,$14,$22,$22,$00,$22,$22,$14,$08,$08,$08,$08,$00
|
||||
byte = $3E,$20,$10,$08,$04,$02,$3E,$00,$3E,$06,$06,$06,$06,$06,$3E,$00
|
||||
byte = $00,$02,$04,$08,$10,$20,$00,$00,$3E,$30,$30,$30,$30,$30,$3E,$00
|
||||
byte = $00,$00,$08,$14,$22,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$7F
|
||||
byte = $04,$08,$10,$00,$00,$00,$00,$00,$00,$00,$1C,$20,$3C,$22,$3C,$00
|
||||
byte = $02,$02,$1E,$22,$22,$22,$1E,$00,$00,$00,$3C,$02,$02,$02,$3C,$00
|
||||
byte = $20,$20,$3C,$22,$22,$22,$3C,$00,$00,$00,$1C,$22,$3E,$02,$3C,$00
|
||||
byte = $18,$24,$04,$1E,$04,$04,$04,$00,$00,$00,$1C,$22,$22,$3C,$20,$1C
|
||||
byte = $02,$02,$1E,$22,$22,$22,$22,$00,$08,$00,$0C,$08,$08,$08,$1C,$00
|
||||
byte = $10,$00,$18,$10,$10,$10,$12,$0C,$02,$02,$22,$12,$0E,$12,$22,$00
|
||||
byte = $0C,$08,$08,$08,$08,$08,$1C,$00,$00,$00,$36,$2A,$2A,$22,$22,$00
|
||||
byte = $00,$00,$1E,$22,$22,$22,$22,$00,$00,$00,$1C,$22,$22,$22,$1C,$00
|
||||
byte = $00,$00,$1E,$22,$22,$1E,$02,$02,$00,$00,$3C,$22,$22,$3C,$20,$20
|
||||
byte = $00,$00,$3A,$06,$02,$02,$02,$00,$00,$00,$3C,$02,$1C,$20,$1E,$00
|
||||
byte = $04,$04,$1E,$04,$04,$24,$18,$00,$00,$00,$22,$22,$22,$32,$2C,$00
|
||||
byte = $00,$00,$22,$22,$22,$14,$08,$00,$00,$00,$22,$22,$2A,$2A,$36,$00
|
||||
byte = $00,$00,$22,$14,$08,$14,$22,$00,$00,$00,$22,$22,$22,$3C,$20,$1C
|
||||
byte = $00,$00,$3E,$10,$08,$04,$3E,$00,$38,$0C,$0C,$06,$0C,$0C,$38,$00
|
||||
byte = $08,$08,$08,$08,$08,$08,$08,$08,$0E,$18,$18,$30,$18,$18,$0E,$00
|
||||
byte = $00,$2C,$1A,$00,$00,$00,$00,$00,$00,$2A,$14,$2A,$14,$2A,$00,$00
|
||||
//
|
||||
// Print string with HGR tile library
|
||||
//
|
||||
export def hgrPutStr(x, y, strptr)#0
|
||||
tileDrawStr(x, y, strptr + 1, ^strptr, @hgrFont + 1024) // Offset into regular char
|
||||
end
|
||||
done
|
@ -1148,22 +1148,29 @@ export def hgrBLT(x, y, w, h, srcptr)#0
|
||||
next
|
||||
curhclr = saveclr
|
||||
end
|
||||
export def hgrMode#1
|
||||
memset(hgr1, 0, $2000) // Clear HGR page 1
|
||||
^showpage1
|
||||
^showfull
|
||||
^showhires
|
||||
^showgraphics
|
||||
drawpage = 1
|
||||
drawbuff = hgrbuff[1]
|
||||
return 1
|
||||
end
|
||||
export def txtMode#0
|
||||
export def hgrMode(mode)#1
|
||||
if mode
|
||||
//
|
||||
// Set HGR mode
|
||||
//
|
||||
memset(hgr1, 0, $2000) // Clear HGR page 1
|
||||
^showpage1
|
||||
^showfull
|
||||
^showhires
|
||||
^showgraphics
|
||||
drawpage = 1
|
||||
drawbuff = hgrbuff[1]
|
||||
return 1
|
||||
fin
|
||||
//
|
||||
// Show text mode
|
||||
//
|
||||
^showpage1
|
||||
^showtext
|
||||
return 0
|
||||
end
|
||||
export def hgrClear#0
|
||||
memset(drawbuff, curhclr, $2000) // Clear HGR page 1
|
||||
memset(drawbuff, curhclr, drawbuff) // Clear current HGR page
|
||||
end
|
||||
//
|
||||
// Set display page, return other page
|
||||
|
377
src/libsrc/apple/hgrtile.pla
Normal file
377
src/libsrc/apple/hgrtile.pla
Normal file
@ -0,0 +1,377 @@
|
||||
include "inc/cmdsys.plh"
|
||||
//
|
||||
// Hardware addresses
|
||||
//
|
||||
const showgraphics = $C050
|
||||
const showtext = $C051
|
||||
const showfull = $C052
|
||||
const showmix = $C053
|
||||
const showpage1 = $C054
|
||||
const showpage2 = $C055
|
||||
const showlores = $C056
|
||||
const showhires = $C057
|
||||
const keyboard = $C000
|
||||
const keystrobe = $C010
|
||||
const txt1 = $0400
|
||||
const txt2 = $0800
|
||||
const hgr1 = $2000
|
||||
const hgr2 = $4000
|
||||
const page1 = 0
|
||||
const page2 = 1
|
||||
|
||||
word txtbuff[] = txt1, txt2
|
||||
word hgrbuff[] = hgr1, hgr2
|
||||
//
|
||||
// Screen tile scanline addresses.
|
||||
//
|
||||
word[] scanaddr = $0000,$0080,$0100,$0180,$0200,$0280,$0300,$0380
|
||||
word = $0028,$00A8,$0128,$01A8,$0228,$02A8,$0328,$03A8
|
||||
word = $0050,$00D0,$0150,$01D0,$0250,$02D0,$0350,$03D0
|
||||
byte[] scanbttml = $00,$80,$00,$80,$00,$80,$00,$80
|
||||
byte = $28,$A8,$28,$A8,$28,$A8,$28,$A8
|
||||
byte = $50,$D0,$50,$D0,$50,$D0,$50,$D0
|
||||
byte[] scanbttmh = $1C,$1C,$1D,$1D,$1E,$1E,$1F,$1F
|
||||
byte = $1C,$1C,$1D,$1D,$1E,$1E,$1F,$1F
|
||||
byte = $1C,$1C,$1D,$1D,$1E,$1E,$1F,$1F
|
||||
|
||||
byte hbmask = $81,$82,$84,$88,$90,$A0,$C0
|
||||
word hcolor[] = $0000,$552A,$2A55,$7F7F,$8080,$D5AA,$AAD5,$FFFF
|
||||
byte drawpage = 0
|
||||
word drawbuff = hgr1
|
||||
|
||||
asm tileInc#0
|
||||
!SOURCE "vmsrc/plvmzp.inc"
|
||||
CURSH = $24
|
||||
CURSV = $25
|
||||
GBASL = $26
|
||||
GBASH = $27
|
||||
GBASE = GBASL
|
||||
TBASL = $28
|
||||
TBASH = $29
|
||||
TBASE = TBASL
|
||||
TBAS2L = $2A
|
||||
TBAS2H = $2B
|
||||
TBAS2E = TBAS2L
|
||||
end
|
||||
//export def tileDraw(x, y, tileptr)#0
|
||||
// var scrnptr
|
||||
//
|
||||
// scrnptr = (scanaddr[y] | drawbuff) + x
|
||||
// scrnptr->[$1C00] = tileptr->[7]
|
||||
// scrnptr->[$1800] = tileptr->[6]
|
||||
// scrnptr->[$1400] = tileptr->[5]
|
||||
// scrnptr->[$1000] = tileptr->[4]
|
||||
// scrnptr->[$0C00] = tileptr->[3]
|
||||
// scrnptr->[$0800] = tileptr->[2]
|
||||
// scrnptr->[$0400] = tileptr->[1]
|
||||
// scrnptr->[$0000] = tileptr->[0]
|
||||
//end
|
||||
export asm tileDraw(x, y, tileptr)#0
|
||||
LDA ESTKL+0,X ; TILEPTRL
|
||||
STA SRCL
|
||||
LDA ESTKH+0,X ; TILEPTRH
|
||||
STA SRCH
|
||||
LDY ESTKL+1,X ; Y COORD
|
||||
LDA ESTKL+2,X ; X COORD
|
||||
CLC
|
||||
end
|
||||
asm _tileDraw
|
||||
ADC $1000,Y ; SCANBTTML
|
||||
STA ESTKL+0,X ; USE ESTK AS POINTER
|
||||
LDA $3001 ; DRAWBUFFH
|
||||
ADC $2000,Y ; SCANBTTMH
|
||||
STA ESTKL+1,X
|
||||
LDY #$07 ; DRAW BOTTOM UP
|
||||
SEC
|
||||
- LDA (SRC),Y
|
||||
STA (ESTKL,X)
|
||||
LDA ESTKL+1,X
|
||||
SBC #$04
|
||||
STA ESTKL+1,X
|
||||
DEY
|
||||
BNE -
|
||||
LDA (SRC),Y
|
||||
STA (ESTKL,X)
|
||||
INX
|
||||
INX
|
||||
INX
|
||||
RTS
|
||||
end
|
||||
//export def tileXorDraw(x, y, tileptr)#0
|
||||
// var scrnptr
|
||||
//
|
||||
// scrnptr = (scanaddr[y] | drawbuff) + x
|
||||
// scrnptr->[$1C00] = tileptr->[7]
|
||||
// scrnptr->[$1800] = tileptr->[6]
|
||||
// scrnptr->[$1400] = tileptr->[5]
|
||||
// scrnptr->[$1000] = tileptr->[4]
|
||||
// scrnptr->[$0C00] = tileptr->[3]
|
||||
// scrnptr->[$0800] = tileptr->[2]
|
||||
// scrnptr->[$0400] = tileptr->[1]
|
||||
// scrnptr->[$0000] = tileptr->[0]
|
||||
//end
|
||||
export asm tileXorDraw(x, y, tileptr)#0
|
||||
LDA ESTKL+0,X ; TILEPTRL
|
||||
STA SRCL
|
||||
LDA ESTKH+0,X ; TILEPTRH
|
||||
STA SRCH
|
||||
LDY ESTKL+1,X ; Y COORD
|
||||
LDA ESTKL+2,X ; X COORD
|
||||
CLC
|
||||
end
|
||||
asm _tileXDraw
|
||||
ADC $1000,Y ; SCANBTTML
|
||||
STA ESTKL+0,X ; USE ESTK AS POINTER
|
||||
LDA $3001 ; DRAWBUFFH
|
||||
ADC $2000,Y ; SCANBTTMH
|
||||
STA ESTKL+1,X
|
||||
LDY #$07 ; DRAW BOTTOM UP
|
||||
SEC
|
||||
- LDA (SRC),Y
|
||||
EOR (ESTKL,X)
|
||||
STA (ESTKL,X)
|
||||
LDA ESTKL+1,X
|
||||
SBC #$04
|
||||
STA ESTKL+1,X
|
||||
DEY
|
||||
BNE -
|
||||
LDA (SRC),Y
|
||||
EOR (ESTKL,X)
|
||||
STA (ESTKL,X)
|
||||
INX
|
||||
INX
|
||||
INX
|
||||
RTS
|
||||
end
|
||||
//export def tileOrDraw(x, y, tileptr)#0
|
||||
// var scrnptr
|
||||
//
|
||||
// scrnptr = (scanaddr[y] | drawbuff) + x
|
||||
// scrnptr->[$1C00] = tileptr->[7]
|
||||
// scrnptr->[$1800] = tileptr->[6]
|
||||
// scrnptr->[$1400] = tileptr->[5]
|
||||
// scrnptr->[$1000] = tileptr->[4]
|
||||
// scrnptr->[$0C00] = tileptr->[3]
|
||||
// scrnptr->[$0800] = tileptr->[2]
|
||||
// scrnptr->[$0400] = tileptr->[1]
|
||||
// scrnptr->[$0000] = tileptr->[0]
|
||||
//end
|
||||
export asm tileOrDraw(x, y, tileptr)#0
|
||||
LDA ESTKL+0,X ; TILEPTRL
|
||||
STA SRCL
|
||||
LDA ESTKH+0,X ; TILEPTRH
|
||||
STA SRCH
|
||||
LDY ESTKL+1,X ; Y COORD
|
||||
LDA ESTKL+2,X ; X COORD
|
||||
CLC
|
||||
end
|
||||
asm _tileODraw
|
||||
ADC $1000,Y ; SCANBTTML
|
||||
STA ESTKL+0,X ; USE ESTK AS POINTER
|
||||
LDA $3001 ; DRAWBUFFH
|
||||
ADC $2000,Y ; SCANBTTMH
|
||||
STA ESTKL+1,X
|
||||
LDY #$07 ; DRAW BOTTOM UP
|
||||
SEC
|
||||
- LDA (SRC),Y
|
||||
ORA (ESTKL,X)
|
||||
STA (ESTKL,X)
|
||||
LDA ESTKL+1,X
|
||||
SBC #$04
|
||||
STA ESTKL+1,X
|
||||
DEY
|
||||
BNE -
|
||||
LDA (SRC),Y
|
||||
ORA (ESTKL,X)
|
||||
STA (ESTKL,X)
|
||||
INX
|
||||
INX
|
||||
INX
|
||||
RTS
|
||||
end
|
||||
//export def tileAndDraw(x, y, tileptr)#0
|
||||
// var scrnptr
|
||||
//
|
||||
// scrnptr = (scanaddr[y] | drawbuff) + x
|
||||
// scrnptr->[$1C00] = tileptr->[7]
|
||||
// scrnptr->[$1800] = tileptr->[6]
|
||||
// scrnptr->[$1400] = tileptr->[5]
|
||||
// scrnptr->[$1000] = tileptr->[4]
|
||||
// scrnptr->[$0C00] = tileptr->[3]
|
||||
// scrnptr->[$0800] = tileptr->[2]
|
||||
// scrnptr->[$0400] = tileptr->[1]
|
||||
// scrnptr->[$0000] = tileptr->[0]
|
||||
//end
|
||||
export asm tileAndDraw(x, y, tileptr)#0
|
||||
LDA ESTKL+0,X ; TILEPTRL
|
||||
STA SRCL
|
||||
LDA ESTKH+0,X ; TILEPTRH
|
||||
STA SRCH
|
||||
LDY ESTKL+1,X ; Y COORD
|
||||
LDA ESTKL+2,X ; X COORD
|
||||
CLC
|
||||
end
|
||||
asm _tileADraw
|
||||
ADC $1000,Y ; SCANBTTML
|
||||
STA ESTKL+0,X ; USE ESTK AS POINTER
|
||||
LDA $3001 ; DRAWBUFFH
|
||||
ADC $2000,Y ; SCANBTTMH
|
||||
STA ESTKL+1,X
|
||||
LDY #$07 ; DRAW BOTTOM UP
|
||||
SEC
|
||||
- LDA (SRC),Y
|
||||
AND (ESTKL,X)
|
||||
STA (ESTKL,X)
|
||||
LDA ESTKL+1,X
|
||||
SBC #$04
|
||||
STA ESTKL+1,X
|
||||
DEY
|
||||
BNE -
|
||||
LDA (SRC),Y
|
||||
AND (ESTKL,X)
|
||||
STA (ESTKL,X)
|
||||
INX
|
||||
INX
|
||||
INX
|
||||
RTS
|
||||
end
|
||||
//export def tileDrawStr(x, y, strptr, strlen, tileset)#0
|
||||
// while strlen
|
||||
// tileDraw(x, y, tileset + ^strptr * 8)
|
||||
// x++
|
||||
// strptr++
|
||||
// strlen--
|
||||
// loop
|
||||
//end
|
||||
export asm tileDrawStr(x, y, strptr, strlen, tileset)#0
|
||||
LDA ESTKL+2,X ; STRPTRL
|
||||
STA TMPL
|
||||
LDA ESTKH+2,X ; STRPTRH
|
||||
STA TMPH
|
||||
LDY ESTKL+3,X ; Y COORD
|
||||
LDA ESTKL+4,X ; X COORD
|
||||
CLC
|
||||
end
|
||||
asm _tileDrawStr
|
||||
ADC $1000,Y ; SCANBTTML
|
||||
STA ESTKL+2,X ; USE ESTK AS POINTER
|
||||
LDA $3001 ; DRAWBUFFH
|
||||
ADC $2000,Y ; SCANBTTMH
|
||||
STA ESTKL+3,X
|
||||
LDA #$00
|
||||
STA ESTKH+1,X ; USE STRLENH AS COUNT
|
||||
-- LDY ESTKH+1,X
|
||||
LDA #$00
|
||||
STA SRCH
|
||||
LDA (TMP),Y ; TILE INDEX * 8
|
||||
ASL
|
||||
ROL SRCH
|
||||
ASL
|
||||
ROL SRCH
|
||||
ASL
|
||||
ROL SRCH
|
||||
CLC
|
||||
ADC ESTKL+0,X ; ADD TO TILESETPTR
|
||||
STA SRCL
|
||||
LDA SRCH
|
||||
ADC ESTKH+0,X
|
||||
STA SRCH
|
||||
LDY #$07 ; DRAW BOTTOM UP
|
||||
SEC
|
||||
- LDA (SRC),Y
|
||||
STA (ESTKL+2,X)
|
||||
LDA ESTKL+3,X
|
||||
SBC #$04
|
||||
STA ESTKL+3,X
|
||||
DEY
|
||||
BNE -
|
||||
LDA (SRC),Y
|
||||
STA (ESTKL+2,X)
|
||||
DEC ESTKL+1,X ; STRLEN
|
||||
BEQ +
|
||||
INC ESTKL+2,X ; RESET SCREEN PTR TO NEXT TILE POS
|
||||
LDA ESTKL+3,X
|
||||
CLC
|
||||
ADC #$1C
|
||||
STA ESTKL+3,X
|
||||
INC ESTKH+1,X ; COUNT++
|
||||
BNE --
|
||||
+ INX
|
||||
INX
|
||||
INX
|
||||
INX
|
||||
INX
|
||||
RTS
|
||||
end
|
||||
export def tileFromText(txtpage, tileset)#0
|
||||
byte y
|
||||
word txtptr
|
||||
|
||||
txtptr = txtbuff[txtpage & 1]
|
||||
for y = 0 to 23
|
||||
tileDrawStr(0, y, scanaddr[y] | txtptr, 40, tileset)
|
||||
next
|
||||
end
|
||||
export def tileMode(mode)#1
|
||||
if mode
|
||||
//
|
||||
// Set HGR mode
|
||||
//
|
||||
memset(hgr1, 0, $2000) // Clear HGR page 1
|
||||
^showpage1
|
||||
^showfull
|
||||
^showhires
|
||||
^showgraphics
|
||||
drawpage = 0
|
||||
drawbuff = hgr1
|
||||
return 0
|
||||
fin
|
||||
//
|
||||
// Show text mode
|
||||
//
|
||||
^showpage1
|
||||
^showtext
|
||||
return 0
|
||||
end
|
||||
export def tileClear#0
|
||||
memset(drawbuff, $0000, drawbuff) // Clear current HGR page
|
||||
end
|
||||
//
|
||||
// Set display page, return other page
|
||||
//
|
||||
export def tileShow(page)#1
|
||||
page = page & 1
|
||||
^(showpage1 + page)
|
||||
return page ^ 1
|
||||
end
|
||||
export def tileSwap#1
|
||||
^(showpage1 + drawpage)
|
||||
drawpage = drawpage ^ 1
|
||||
drawbuff = hgrbuff[drawpage]
|
||||
return drawpage
|
||||
end
|
||||
export def tileDrawBuf(page)#1
|
||||
drawpage = page & 1
|
||||
drawbuff = hgrbuff[drawpage]
|
||||
return drawpage
|
||||
end
|
||||
//
|
||||
// Assembly fixups
|
||||
//
|
||||
_tileDraw:1 = @scanbttml
|
||||
_tileDraw:6 = @drawbuff.1
|
||||
_tileDraw:9 = @scanbttmh
|
||||
_tileXDraw:1 = @scanbttml
|
||||
_tileXDraw:6 = @drawbuff.1
|
||||
_tileXDraw:9 = @scanbttmh
|
||||
_tileODraw:1 = @scanbttml
|
||||
_tileODraw:6 = @drawbuff.1
|
||||
_tileODraw:9 = @scanbttmh
|
||||
_tileADraw:1 = @scanbttml
|
||||
_tileADraw:6 = @drawbuff.1
|
||||
_tileADraw:9 = @scanbttmh
|
||||
_tileDrawStr:1 = @scanbttml
|
||||
_tileDrawStr:6 = @drawbuff.1
|
||||
_tileDrawStr:9 = @scanbttmh
|
||||
done
|
||||
|
17
src/makefile
17
src/makefile
@ -63,6 +63,8 @@ HGRLIB = rel/apple/HGRLIB\#FE1000
|
||||
GRLIB = rel/apple/GRLIB\#FE1000
|
||||
DGRLIB = rel/apple/DGRLIB\#FE1000
|
||||
HGRSPRITE = rel/apple/HGRSPRITE\#FE1000
|
||||
HGRTILE = rel/apple/HGRTILE\#FE1000
|
||||
HGRFONT = rel/apple/HGRFONT\#FE1000
|
||||
LINES = rel/LINES\#FE1000
|
||||
GRAFIX = rel/apple/GRAFIX\#FE1000
|
||||
SFM = rel/apple/SFM\#FE1000
|
||||
@ -74,6 +76,7 @@ ROGUE = rel/ROGUE\#FE1000
|
||||
ROGUEMAP = rel/ROGUEMAP\#FE1000
|
||||
ROGUECOMBAT= rel/ROGUECOMBAT\#FE1000
|
||||
MON = rel/apple/MON\#FE1000
|
||||
TILETEST = rel/apple/TILETEST\#FE1000
|
||||
HGRTEST = rel/apple/HGRTEST\#FE1000
|
||||
GRTEST = rel/apple/GRTEST\#FE1000
|
||||
DGRTEST = rel/apple/DGRTEST\#FE1000
|
||||
@ -106,7 +109,7 @@ TXTTYPE = .TXT
|
||||
#SYSTYPE = \#FF2000
|
||||
#TXTTYPE = \#040000
|
||||
|
||||
apple: $(PLVMZP_APL) $(PLASM) $(PLVM) $(PLVM01) $(PLVM02) $(PLVMJIT) $(PLVM802) $(PLVM03) $(PLVMJIT03) $(CMD) $(CMDJIT) $(JIT) $(JIT16) $(JITUNE) $(SOSCMD) $(SOSCMDJIT) $(PLASMAPLASM) $(CODEOPT) $(ZIP) $(MATCHFILES) $(ARGS) $(MEMMGR) $(MEMTEST) $(FIBER) $(FIBERTEST) $(LONGJMP) $(ED) $(MON) $(COPY) $(DEL) $(REN) $(CAT) $(NEWDIR) $(TYPE) $(SOS) $(ROD) $(SIEVE) $(PRIMEGAP) $(MOUSE) $(UTHERNET2) $(UTHERNET) $(ETHERIP) $(INET) $(DHCP) $(HTTPD) $(TFTPD) $(ROGUE) $(ROGUEMAP) $(ROGUECOMBAT) $(SFM) $(SFMSPRT) $(GRAFIX) $(GFXDEMO) $(LINES) $(HGRSPRITE) $(HGRLIB) $(HGRTEST) $(GRLIB) $(DGRLIB) $(GRTEST) $(DGRTEST) $(HGRTEST) $(FILEIO_APL) $(CONIO_APL) $(JOYBUZZ) $(PORTIO) $(SPIPORT) $(SDFAT) $(FATCAT) $(FATGET) $(FATPUT) $(FATWDSK) $(FATRDSK) $(INT32) $(INT32TEST) $(SANE) $(FPSTR) $(FPU) $(SANITY) $(LZ4) $(LZ4CAT) $(RPNCALC) $(SNDSEQ) $(PLAYSEQ)
|
||||
apple: $(PLVMZP_APL) $(PLASM) $(PLVM) $(PLVM01) $(PLVM02) $(PLVMJIT) $(PLVM802) $(PLVM03) $(PLVMJIT03) $(CMD) $(CMDJIT) $(JIT) $(JIT16) $(JITUNE) $(SOSCMD) $(SOSCMDJIT) $(PLASMAPLASM) $(CODEOPT) $(ZIP) $(MATCHFILES) $(ARGS) $(MEMMGR) $(MEMTEST) $(FIBER) $(FIBERTEST) $(LONGJMP) $(ED) $(MON) $(COPY) $(DEL) $(REN) $(CAT) $(NEWDIR) $(TYPE) $(SOS) $(ROD) $(SIEVE) $(PRIMEGAP) $(MOUSE) $(UTHERNET2) $(UTHERNET) $(ETHERIP) $(INET) $(DHCP) $(HTTPD) $(TFTPD) $(ROGUE) $(ROGUEMAP) $(ROGUECOMBAT) $(SFM) $(SFMSPRT) $(GRAFIX) $(GFXDEMO) $(LINES) $(HGRTILE) $(HGRFONT) $(HGRSPRITE) $(HGRLIB) $(TILETEST) $(HGRTEST) $(GRLIB) $(DGRLIB) $(GRTEST) $(DGRTEST) $(HGRTEST) $(FILEIO_APL) $(CONIO_APL) $(JOYBUZZ) $(PORTIO) $(SPIPORT) $(SDFAT) $(FATCAT) $(FATGET) $(FATPUT) $(FATWDSK) $(FATRDSK) $(INT32) $(INT32TEST) $(SANE) $(FPSTR) $(FPU) $(SANITY) $(LZ4) $(LZ4CAT) $(RPNCALC) $(SNDSEQ) $(PLAYSEQ)
|
||||
|
||||
-rm vmsrc/plvmzp.inc
|
||||
|
||||
@ -444,6 +447,18 @@ $(DGRLIB): libsrc/apple/dgrlib.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < libsrc/apple/dgrlib.pla > libsrc/apple/dgrlib.a
|
||||
acme --setpc 4094 -o $(DGRLIB) libsrc/apple/dgrlib.a
|
||||
|
||||
$(TILETEST): samplesrc/tiletest.pla $(PLASM)
|
||||
./$(PLASM) -AMOW < samplesrc/tiletest.pla > samplesrc/tiletest.a
|
||||
acme --setpc 4094 -o $(TILETEST) samplesrc/tiletest.a
|
||||
|
||||
$(HGRTILE): libsrc/apple/hgrtile.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < libsrc/apple/hgrtile.pla > libsrc/apple/hgrtile.a
|
||||
acme --setpc 4094 -o $(HGRTILE) libsrc/apple/hgrtile.a
|
||||
|
||||
$(HGRFONT): libsrc/apple/hgrfont.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < libsrc/apple/hgrfont.pla > libsrc/apple/hgrfont.a
|
||||
acme --setpc 4094 -o $(HGRFONT) libsrc/apple/hgrfont.a
|
||||
|
||||
$(HGRSPRITE): libsrc/apple/hgrsprite.pla $(PLVM02) $(PLASM)
|
||||
./$(PLASM) -AMOW < libsrc/apple/hgrsprite.pla > libsrc/apple/hgrsprite.a
|
||||
acme --setpc 4094 -o $(HGRSPRITE) libsrc/apple/hgrsprite.a
|
||||
|
@ -10,6 +10,8 @@ mkdir prodos/sys
|
||||
cp rel/apple/FILEIO#FE1000 prodos/sys/FILEIO.REL
|
||||
cp rel/apple/CONIO#FE1000 prodos/sys/CONIO.REL
|
||||
cp rel/LINES#FE1000 prodos/sys/LINES.REL
|
||||
cp rel/apple/HGRFONT#FE1000 prodos/sys/HGRFONT.REL
|
||||
cp rel/apple/HGRTILE#FE1000 prodos/sys/HGRTILE.REL
|
||||
cp rel/apple/HGRSPRITE#FE1000 prodos/sys/HGRSPRITE.REL
|
||||
cp rel/apple/HGRLIB#FE1000 prodos/sys/HGRLIB.REL
|
||||
cp rel/apple/GRLIB#FE1000 prodos/sys/GRLIB.REL
|
||||
@ -71,6 +73,7 @@ cp ../sysfiles/ELEMS.CODE#060000 prodos/fpsos/sys/ELEMS.CODE.BIN
|
||||
rm -rf prodos/demos
|
||||
mkdir prodos/demos
|
||||
cp rel/INT32TEST#FE1000 prodos/demos/INT32TEST.REL
|
||||
cp rel/apple/TILETEST#FE1000 prodos/demos/TILETEST.REL
|
||||
cp rel/apple/HGRTEST#FE1000 prodos/demos/HGRTEST.REL
|
||||
cp rel/apple/GRTEST#FE1000 prodos/demos/GRTEST.REL
|
||||
cp rel/apple/DGRTEST#FE1000 prodos/demos/DGRTEST.REL
|
||||
@ -124,6 +127,7 @@ cp samplesrc/int32test.pla prodos/bld/samples/INT32TEST.PLA.TXT
|
||||
cp samplesrc/grtest.pla prodos/bld/samples/GRTEST.PLA.TXT
|
||||
cp samplesrc/dgrtest.pla prodos/bld/samples/DGRTEST.PLA.TXT
|
||||
cp samplesrc/hgrtest.pla prodos/bld/samples/HGRTEST.PLA.TXT
|
||||
cp samplesrc/tiletest.pla prodos/bld/samples/TILETEST.PLA.TXT
|
||||
cp samplesrc/fibertest.pla prodos/bld/samples/FIBERTEST.PLA.TXT
|
||||
cp samplesrc/mousetest.pla prodos/bld/samples/MOUSETEST.PLA.TXT
|
||||
cp samplesrc/memtest.pla prodos/bld/samples/MEMTEST.PLA.TXT
|
||||
@ -164,6 +168,8 @@ cp inc/matchfiles.plh prodos/bld/inc/MATCHFILES.PLH.TXT
|
||||
cp inc/cmdsys.plh prodos/bld/inc/CMDSYS.PLH.TXT
|
||||
cp inc/conio.plh prodos/bld/inc/CONIO.PLH.TXT
|
||||
cp inc/lines.plh prodos/bld/inc/LINES.PLH.TXT
|
||||
cp inc/hgrfont.plh prodos/bld/inc/HGRFONT.PLH.TXT
|
||||
cp inc/hgrtile.plh prodos/bld/inc/HGRTILE.PLH.TXT
|
||||
cp inc/hgrsprite.plh prodos/bld/inc/HGRSPRITE.PLH.TXT
|
||||
cp inc/hgrlib.plh prodos/bld/inc/HGRLIB.PLH.TXT
|
||||
cp inc/grlib.plh prodos/bld/inc/GRLIB.PLH.TXT
|
||||
|
@ -24,7 +24,7 @@ def dgrTest#0
|
||||
byte b, l, k
|
||||
word i, j, ii, ij
|
||||
|
||||
b = dgrMode()
|
||||
b = dgrMode(TRUE)
|
||||
dgrDrawBuf(0)
|
||||
for k = 15 downto 0
|
||||
dgrClear(k)
|
||||
@ -59,7 +59,7 @@ def dgrTest#0
|
||||
fin
|
||||
loop
|
||||
^$C010
|
||||
txtMode
|
||||
dgrMode(FALSE)
|
||||
end
|
||||
|
||||
dgrTest
|
||||
|
@ -24,7 +24,7 @@ def grTest#0
|
||||
byte b, l, k
|
||||
word i, j, ii, ij
|
||||
|
||||
b = grMode()
|
||||
b = grMode(TRUE)
|
||||
grDrawBuf(0)
|
||||
for k = 15 downto 0
|
||||
grClear(k)
|
||||
@ -59,7 +59,7 @@ def grTest#0
|
||||
fin
|
||||
loop
|
||||
^$C010
|
||||
txtMode
|
||||
grMode(FALSE)
|
||||
end
|
||||
|
||||
grTest
|
||||
|
@ -66,7 +66,7 @@ def testblt(sprtnum)#0
|
||||
loop
|
||||
end
|
||||
|
||||
hgrMode
|
||||
hgrMode(TRUE)
|
||||
spriteDrawBuf(hgrDrawBuf(0)) // So we can see the compile process
|
||||
sprtBall = spriteCompile(10, 10, 5, 5, @ball)
|
||||
hgrColor(0)
|
||||
@ -77,5 +77,5 @@ spriteDrawBuf(hgrDrawBuf(1))
|
||||
spriteAdd(0, sprtBall)
|
||||
testblt(16)
|
||||
getc
|
||||
txtMode
|
||||
hgrMode(FALSE)
|
||||
done
|
||||
|
@ -575,7 +575,7 @@ next
|
||||
heapstart = heapmark()
|
||||
//puts("\nBeginning available memory: "); puti(heapavail()); putln
|
||||
repeat
|
||||
hgrMode
|
||||
hgrMode(TRUE)
|
||||
spriteDrawBuf(hgrDrawBuf(0)) // Single buffered
|
||||
spriteAdd(SHIP_SPRTNUM, sprtShip)
|
||||
spriteAdd(SPIDER_SPRTEBASE, sprtEgg3)
|
||||
@ -617,7 +617,7 @@ repeat
|
||||
puts("\nEarth has been overrun")
|
||||
puts("\nby the Spiders from Mars\n")
|
||||
fin
|
||||
txtMode
|
||||
hgrMode(FALSE)
|
||||
//
|
||||
// Clear sprite lists
|
||||
//
|
||||
|
@ -169,7 +169,7 @@ var sprtSplat1, sprtSplat2
|
||||
var sprtWeb1, sprtWeb2, sprtWeb3
|
||||
var sprtShip, sprtMissle, sprtDummy
|
||||
|
||||
hgrMode
|
||||
hgrMode(TRUE)
|
||||
spriteDrawBuf(hgrDrawBuf(0)) // So we can see the compile process
|
||||
sprtShip = spriteCompile(14, 14, 7, 13, @ship)
|
||||
sprtMissle = spriteCompile( 6, 8, 3, 0, @missle)
|
||||
@ -185,7 +185,7 @@ sprtWeb3 = spriteCompile(20, 8, 10, 0, @web3)
|
||||
sprtSplat1 = spriteCompile(20, 13, 10, 6, @splat1)
|
||||
sprtSplat2 = spriteCompile(24, 17, 12, 8, @splat2)
|
||||
sprtDummy = spriteCompile( 7, 8, 0, 0, @dummy)
|
||||
txtMode
|
||||
hgrMode(FALSE)
|
||||
spriteSave("SHIP", sprtShip)
|
||||
spriteSave("MISSLE", sprtMissle)
|
||||
spriteSave("EGG3", sprtEgg3)
|
||||
|
13
src/samplesrc/tiletest.pla
Normal file
13
src/samplesrc/tiletest.pla
Normal file
@ -0,0 +1,13 @@
|
||||
include "inc/cmdsys.plh"
|
||||
include "inc/hgrtile.plh"
|
||||
include "inc/hgrfont.plh"
|
||||
sysflags reshgr1 // Reserve HGR page 1
|
||||
|
||||
tileMode(TRUE)
|
||||
hgrPutStr(5, 1, "Hello HiRes Tile Demo")
|
||||
getc
|
||||
tileFromText(0, @hgrFont)
|
||||
getc
|
||||
tileMode(FALSE)
|
||||
done
|
||||
|
@ -10,6 +10,8 @@ echo "BLD/INC/MATCHFILES.PLH"; atftp $1 --put -l inc/matchfiles.plh -r $2/BLD/IN
|
||||
echo "BLD/INC/CMDSYS.PLH"; atftp $1 --put -l inc/cmdsys.plh -r $2/BLD/INC/CMDSYS.PLH#040000
|
||||
echo "BLD/INC/CONIO.PLH"; atftp $1 --put -l inc/conio.plh -r $2/BLD/INC/CONIO.PLH#040000
|
||||
echo "BLD/INC/LINES.PLH"; atftp $1 --put -l inc/lines.plh -r $2/BLD/INC/LINES.PLH#040000
|
||||
echo "BLD/INC/HGRTILE.PLH"; atftp $1 --put -l inc/hgrtile.plh -r $2/BLD/INC/HGRTILE.PLH#040000
|
||||
echo "BLD/INC/HGRFONT.PLH";atftp $1 --put -l inc/hgrfont.plh -r $2/BLD/INC/HGRFONT.PLH#040000
|
||||
echo "BLD/INC/HGRSPRITE.PLH";atftp $1 --put -l inc/hgrsprite.plh -r $2/BLD/INC/HGRSPRITE.PLH#040000
|
||||
echo "BLD/INC/HGRLIB.PLH"; atftp $1 --put -l inc/hgrlib.plh -r $2/BLD/INC/HGRLIB.PLH#040000
|
||||
echo "BLD/INC/GRLIB.PLH"; atftp $1 --put -l inc/grlib.plh -r $2/BLD/INC/GRLIB.PLH#040000
|
||||
@ -44,6 +46,7 @@ echo "BLD/SAMPLES/INT32TEST.PLA"; atftp $1 --put -l samplesrc/int32test.pla -r $
|
||||
echo "BLD/SAMPLES/HGRTEST.PLA"; atftp $1 --put -l samplesrc/hgrtest.pla -r $2/BLD/SAMPLES/HGRTEST.PLA#040000
|
||||
echo "BLD/SAMPLES/GRTEST.PLA"; atftp $1 --put -l samplesrc/grtest.pla -r $2/BLD/SAMPLES/GRTEST.PLA#040000
|
||||
echo "BLD/SAMPLES/DGRTEST.PLA"; atftp $1 --put -l samplesrc/dgrtest.pla -r $2/BLD/SAMPLES/DGRTEST.PLA#040000
|
||||
echo "BLD/SAMPLES/TILETEST.PLA"; atftp $1 --put -l samplesrc/tiletest.pla -r $2/BLD/SAMPLES/TILETEST.PLA#040000
|
||||
echo "BLD/SAMPLES/HGRTEST.PLA"; atftp $1 --put -l samplesrc/hgrtest.pla -r $2/BLD/SAMPLES/HGRTEST.PLA#040000
|
||||
echo "BLD/SAMPLES/PLAYSEQ.PLA"; atftp $1 --put -l samplesrc/playseq.pla -r $2/BLD/SAMPLES/PLAYSEQ.PLA#040000
|
||||
echo "BLD/SAMPLES/RPNCALC.PLA"; atftp $1 --put -l samplesrc/rpncalc.pla -r $2/BLD/SAMPLES/RPNCALC.PLA#040000
|
||||
|
@ -5,6 +5,7 @@ echo "DEMOS/RPNCALC"; atftp $1 --put -l rel/RPNCALC#FE1000
|
||||
echo "DEMOS/LZ4CAT"; atftp $1 --put -l rel/LZ4CAT#FE1000 -r $2/DEMOS/LZ4CAT#FE1000
|
||||
echo "DEMOS/SIEVE"; atftp $1 --put -l rel/SIEVE#FE1000 -r $2/DEMOS/SIEVE#FE1000
|
||||
echo "DEMOS/ROD"; atftp $1 --put -l rel/apple/ROD#FE1000 -r $2/DEMOS/ROD#FE1000
|
||||
echo "DEMOS/TILETEST"; atftp $1 --put -l rel/apple/TILETEST#FE1000 -r $2/DEMOS/TILETEST#FE1000
|
||||
echo "DEMOS/HGRTEST"; atftp $1 --put -l rel/apple/HGRTEST#FE1000 -r $2/DEMOS/HGRTEST#FE1000
|
||||
echo "DEMOS/GRTEST"; atftp $1 --put -l rel/apple/GRTEST#FE1000 -r $2/DEMOS/GRTEST#FE1000
|
||||
echo "DEMOS/INT32TEST"; atftp $1 --put -l rel/INT32TEST#FE1000 -r $2/DEMOS/INT32TEST#FE1000
|
||||
|
@ -23,6 +23,8 @@ echo "SYS/LONGJUMP"; atftp $1 --put -l rel/LONGJMP#FE1000 -r $2/SYS/LONGJMP#FE10
|
||||
echo "SYS/MEMMGR"; atftp $1 --put -l rel/MEMMGR#FE1000 -r $2/SYS/MEMMGR#FE1000
|
||||
echo "SYS/LZ4"; atftp $1 --put -l rel/LZ4#FE1000 -r $2/SYS/LZ4#FE1000
|
||||
echo "SYS/CONIO"; atftp $1 --put -l rel/apple/CONIO#FE1000 -r $2/SYS/CONIO#FE1000
|
||||
echo "SYS/HGRTILE"; atftp $1 --put -l rel/apple/HGRTILE#FE1000 -r $2/SYS/HGRTILE#FE1000
|
||||
echo "SYS/HGRFONT"; atftp $1 --put -l rel/apple/HGRFONT#FE1000 -r $2/SYS/HGRFONT#FE1000
|
||||
echo "SYS/HGRSPRITE"; atftp $1 --put -l rel/apple/HGRSPRITE#FE1000 -r $2/SYS/HGRSPRITE#FE1000
|
||||
echo "SYS/LINES"; atftp $1 --put -l rel/LINES#FE1000 -r $2/SYS/LINES#FE1000
|
||||
echo "SYS/HGRLIB"; atftp $1 --put -l rel/apple/HGRLIB#FE1000 -r $2/SYS/HGRLIB#FE1000
|
||||
|
Loading…
x
Reference in New Issue
Block a user