adjusted options of library modules

This commit is contained in:
Irmen de Jong 2023-12-29 22:21:44 +01:00
parent d03ff1e4d0
commit 813007a5d8
12 changed files with 172 additions and 172 deletions

View File

@ -8,7 +8,7 @@
; so that the program itself can be larger without starting to overwrite the graphics memory. ; so that the program itself can be larger without starting to overwrite the graphics memory.
graphics { graphics {
%option no_symbol_prefixing, ignore_unused %option ignore_unused
const uword WIDTH = 320 const uword WIDTH = 320
const ubyte HEIGHT = 200 const ubyte HEIGHT = 200
@ -175,11 +175,11 @@ graphics {
if separate_pixels { if separate_pixels {
%asm {{ %asm {{
lda pixaddr lda p8v_pixaddr
sta P8ZP_SCRATCH_W1 sta P8ZP_SCRATCH_W1
lda pixaddr+1 lda p8v_pixaddr+1
sta P8ZP_SCRATCH_W1+1 sta P8ZP_SCRATCH_W1+1
ldy separate_pixels ldy p8v_separate_pixels
lda hline_filled_right,y lda hline_filled_right,y
eor #255 eor #255
ldy #0 ldy #0
@ -193,23 +193,23 @@ graphics {
if length { if length {
%asm {{ %asm {{
lda length lda p8v_length
and #7 and #7
sta separate_pixels sta p8v_separate_pixels
lsr length+1 lsr p8v_length+1
ror length ror p8v_length
lsr length+1 lsr p8v_length+1
ror length ror p8v_length
lsr length+1 lsr p8v_length+1
ror length ror p8v_length
lda pixaddr lda p8v_pixaddr
sta _modified+1 sta _modified+1
lda pixaddr+1 lda p8v_pixaddr+1
sta _modified+2 sta _modified+2
lda length lda p8v_length
ora length+1 ora p8v_length+1
beq _zero beq _zero
ldy length ldy p8v_length
ldx #$ff ldx #$ff
_modified stx $ffff ; modified _modified stx $ffff ; modified
lda _modified+1 lda _modified+1
@ -221,7 +221,7 @@ _modified stx $ffff ; modified
+ dey + dey
bne _modified bne _modified
_zero _zero
ldy separate_pixels ldy p8v_separate_pixels
beq hline_zero2 beq hline_zero2
lda _modified+1 lda _modified+1
sta P8ZP_SCRATCH_W1 sta P8ZP_SCRATCH_W1
@ -319,9 +319,9 @@ hline_zero2
inline asmsub plot(uword plotx @XY, ubyte ploty @A) clobbers (A, X, Y) { inline asmsub plot(uword plotx @XY, ubyte ploty @A) clobbers (A, X, Y) {
%asm {{ %asm {{
stx graphics.internal_plotx stx p8b_graphics.p8v_internal_plotx
sty graphics.internal_plotx+1 sty p8b_graphics.p8v_internal_plotx+1
jsr graphics.internal_plot jsr p8b_graphics.p8s_internal_plot
}} }}
} }
@ -333,11 +333,11 @@ hline_zero2
asmsub internal_plot(ubyte ploty @A) clobbers (A, X, Y) { ; internal_plotx is 16 bits 0 to 319... doesn't fit in a register asmsub internal_plot(ubyte ploty @A) clobbers (A, X, Y) { ; internal_plotx is 16 bits 0 to 319... doesn't fit in a register
%asm {{ %asm {{
tay tay
lda internal_plotx+1 lda p8v_internal_plotx+1
sta P8ZP_SCRATCH_W2+1 sta P8ZP_SCRATCH_W2+1
lsr a ; 0 lsr a ; 0
sta P8ZP_SCRATCH_W2 sta P8ZP_SCRATCH_W2
lda internal_plotx lda p8v_internal_plotx
pha pha
and #7 and #7
tax tax
@ -365,7 +365,7 @@ _ormask .byte 128, 64, 32, 16, 8, 4, 2, 1
; the y lookup tables encodes this formula: BITMAP_ADDRESS + 320*(py>>3) + (py & 7) (y from 0..199) ; the y lookup tables encodes this formula: BITMAP_ADDRESS + 320*(py>>3) + (py & 7) (y from 0..199)
; We use the 64tass syntax for range expressions to calculate this table on assembly time. ; We use the 64tass syntax for range expressions to calculate this table on assembly time.
_plot_y_values := BITMAP_ADDRESS + 320*(range(200)>>3) + (range(200) & 7) _plot_y_values := p8c_BITMAP_ADDRESS + 320*(range(200)>>3) + (range(200) & 7)
_y_lookup_lo .byte <_plot_y_values _y_lookup_lo .byte <_plot_y_values
_y_lookup_hi .byte >_plot_y_values _y_lookup_hi .byte >_plot_y_values
@ -375,9 +375,9 @@ _y_lookup_hi .byte >_plot_y_values
asmsub get_y_lookup(ubyte yy @Y) -> uword @AY { asmsub get_y_lookup(ubyte yy @Y) -> uword @AY {
%asm {{ %asm {{
lda internal_plot._y_lookup_lo,y lda p8s_internal_plot._y_lookup_lo,y
pha pha
lda internal_plot._y_lookup_hi,y lda p8s_internal_plot._y_lookup_hi,y
tay tay
pla pla
rts rts

View File

@ -3,7 +3,7 @@
; BMX Specification: https://cx16forum.com/forum/viewtopic.php?t=6945 ; BMX Specification: https://cx16forum.com/forum/viewtopic.php?t=6945
%import diskio %import diskio
%option no_symbol_prefixing, ignore_unused %option ignore_unused
bmx { bmx {

View File

@ -2,6 +2,7 @@
; Docs: https://github.com/X16Community/x16-emulator#emulator-io-registers ; Docs: https://github.com/X16Community/x16-emulator#emulator-io-registers
emudbg { emudbg {
%option ignore_unused
const uword EMU_BASE = $9fb0 const uword EMU_BASE = $9fb0
@ -13,10 +14,14 @@ emudbg {
&ubyte EMU_RECORD_GIF = EMU_BASE + 5 &ubyte EMU_RECORD_GIF = EMU_BASE + 5
&ubyte EMU_RECORD_WAV = EMU_BASE + 6 &ubyte EMU_RECORD_WAV = EMU_BASE + 6
&ubyte EMU_CMDKEYS_DISABLED = EMU_BASE + 7 &ubyte EMU_CMDKEYS_DISABLED = EMU_BASE + 7
&ubyte EMU_CPUCLK_L = EMU_BASE + 8 ; write: reset cpu clock to 0 &ubyte EMU_CPUCLK_L = EMU_BASE + 8
&ubyte EMU_CPUCLK_M = EMU_BASE + 9 ; write: outputs "User debug 1: $xx" &ubyte EMU_CPUCLK_M = EMU_BASE + 9
&ubyte EMU_CPUCLK_H = EMU_BASE + 10 ; write: outputs "User debug 2: $xx" &ubyte EMU_CPUCLK_H = EMU_BASE + 10
&ubyte EMU_CPUCLK_U = EMU_BASE + 11 ; write: outputs as character to console &ubyte EMU_CPUCLK_U = EMU_BASE + 11
&ubyte EMU_CPUCLK_RESET = EMU_BASE + 8 ; write: reset cpu clock to 0
&ubyte EMU_DBGOUT1 = EMU_BASE + 9 ; write: outputs "User debug 1: $xx"
&ubyte EMU_DBGOUT2 = EMU_BASE + 10 ; write: outputs "User debug 2: $xx"
&ubyte EMU_CHROUT = EMU_BASE + 11 ; write: outputs as character to console
; 12 is unused for now ; 12 is unused for now
&ubyte EMU_KEYMAP = EMU_BASE + 13 &ubyte EMU_KEYMAP = EMU_BASE + 13
&ubyte EMU_EMU_DETECT1 = EMU_BASE + 14 &ubyte EMU_EMU_DETECT1 = EMU_BASE + 14
@ -45,16 +50,16 @@ emudbg {
sub console_chrout(ubyte char) { sub console_chrout(ubyte char) {
; note: make sure the character is in Iso encoding. ; note: make sure the character is in Iso encoding.
if is_emulator() if is_emulator()
EMU_CPUCLK_U = char EMU_CHROUT = char
} }
sub console_value1(ubyte value) { sub console_value1(ubyte value) {
if is_emulator() if is_emulator()
EMU_CPUCLK_M = value EMU_DBGOUT1 = value
} }
sub console_value2(ubyte value) { sub console_value2(ubyte value) {
if is_emulator() if is_emulator()
EMU_CPUCLK_H = value EMU_DBGOUT2 = value
} }
} }

View File

@ -24,7 +24,7 @@
gfx2 { gfx2 {
%option no_symbol_prefixing, ignore_unused %option ignore_unused
; read-only control variables: ; read-only control variables:
ubyte active_mode = 0 ubyte active_mode = 0
@ -141,8 +141,8 @@ gfx2 {
; lores 256c ; lores 256c
position(xx, yy) position(xx, yy)
%asm {{ %asm {{
lda color lda p8v_color
ldx length+1 ldx p8v_length+1
beq + beq +
ldy #0 ldy #0
- sta cx16.VERA_DATA0 - sta cx16.VERA_DATA0
@ -150,7 +150,7 @@ gfx2 {
bne - bne -
dex dex
bne - bne -
+ ldy length ; remaining + ldy p8v_length ; remaining
beq + beq +
- sta cx16.VERA_DATA0 - sta cx16.VERA_DATA0
dey dey
@ -180,7 +180,7 @@ gfx2 {
sta cx16.VERA_ADDR_L sta cx16.VERA_ADDR_L
lda cx16.r0+1 lda cx16.r0+1
sta cx16.VERA_ADDR_M sta cx16.VERA_ADDR_M
ldx xx ldx p8v_xx
}} }}
repeat length { repeat length {
@ -189,8 +189,8 @@ gfx2 {
and #3 and #3
tay tay
lda cx16.VERA_DATA0 lda cx16.VERA_DATA0
and gfx2.plot.mask4c,y and p8b_gfx2.p8s_plot.p8v_mask4c,y
ora colorbits,y ora p8v_colorbits,y
sta cx16.VERA_DATA0 sta cx16.VERA_DATA0
cpy #%00000011 ; next vera byte? cpy #%00000011 ; next vera byte?
bne ++ bne ++
@ -232,9 +232,9 @@ gfx2 {
position(xx,yy) position(xx,yy)
cx16.VERA_ADDR_H = cx16.VERA_ADDR_H & %00000111 | (14<<4) cx16.VERA_ADDR_H = cx16.VERA_ADDR_H & %00000111 | (14<<4)
%asm {{ %asm {{
ldy lheight ldy p8v_lheight
beq + beq +
lda color lda p8v_color
- sta cx16.VERA_DATA0 - sta cx16.VERA_DATA0
dey dey
bne - bne -
@ -260,8 +260,8 @@ gfx2 {
repeat lheight { repeat lheight {
%asm {{ %asm {{
lda cx16.VERA_DATA0 lda cx16.VERA_DATA0
and mask and p8v_mask
ora color ora p8v_color
sta cx16.VERA_DATA1 sta cx16.VERA_DATA1
}} }}
} }
@ -534,7 +534,7 @@ gfx2 {
sta cx16.VERA_ADDR_M sta cx16.VERA_ADDR_M
lda cx16.r0 lda cx16.r0
sta cx16.VERA_ADDR_L sta cx16.VERA_ADDR_L
lda color lda p8v_color
sta cx16.VERA_DATA0 sta cx16.VERA_DATA0
}} }}
} }
@ -558,9 +558,9 @@ gfx2 {
lda cx16.r0L lda cx16.r0L
sta cx16.VERA_ADDR_L sta cx16.VERA_ADDR_L
ldy cx16.r2L ; xbits ldy cx16.r2L ; xbits
lda mask4c,y lda p8v_mask4c,y
and cx16.VERA_DATA0 and cx16.VERA_DATA0
ora color ora p8v_color
sta cx16.VERA_DATA0 sta cx16.VERA_DATA0
}} }}
} }
@ -605,10 +605,10 @@ gfx2 {
sta cx16.VERA_ADDR_L sta cx16.VERA_ADDR_L
lda cx16.VERA_DATA0 lda cx16.VERA_DATA0
pha pha
lda xx lda p8v_xx
and #3 and #3
tay tay
lda gfx2.plot.shift4c,y lda p8b_gfx2.p8s_plot.p8v_shift4c,y
tay tay
pla pla
cpy #0 cpy #0
@ -651,21 +651,21 @@ gfx2 {
;; cx16.r12L++ ;; cx16.r12L++
%asm {{ %asm {{
ldy cx16.r12L ldy cx16.r12L
lda sxl lda p8v_sxl
sta stack_xl_lsb,y sta p8v_stack_xl_lsb,y
lda sxl+1 lda p8v_sxl+1
sta stack_xl_msb,y sta p8v_stack_xl_msb,y
lda sxr lda p8v_sxr
sta stack_xr_lsb,y sta p8v_stack_xr_lsb,y
lda sxr+1 lda p8v_sxr+1
sta stack_xr_msb,y sta p8v_stack_xr_msb,y
lda sy lda p8v_sy
sta stack_y_lsb,y sta p8v_stack_y_lsb,y
lda sy+1 lda p8v_sy+1
sta stack_y_msb,y sta p8v_stack_y_msb,y
ldy cx16.r12L ldy cx16.r12L
lda sdy lda p8v_sdy
sta stack_dy,y sta p8v_stack_dy,y
inc cx16.r12L inc cx16.r12L
}} }}
} }
@ -679,21 +679,21 @@ gfx2 {
%asm {{ %asm {{
dec cx16.r12L dec cx16.r12L
ldy cx16.r12L ldy cx16.r12L
lda stack_xl_lsb,y lda p8v_stack_xl_lsb,y
sta x1 sta p8v_x1
lda stack_xl_msb,y lda p8v_stack_xl_msb,y
sta x1+1 sta p8v_x1+1
lda stack_xr_lsb,y lda p8v_stack_xr_lsb,y
sta x2 sta p8v_x2
lda stack_xr_msb,y lda p8v_stack_xr_msb,y
sta x2+1 sta p8v_x2+1
lda stack_y_lsb,y lda p8v_stack_y_lsb,y
sta yy sta p8v_yy
lda stack_y_msb,y lda p8v_stack_y_msb,y
sta yy+1 sta p8v_yy+1
ldy cx16.r12L ldy cx16.r12L
lda stack_dy,y lda p8v_stack_dy,y
sta dy sta p8v_dy
}} }}
yy+=dy yy+=dy
} }
@ -852,7 +852,7 @@ skip:
position(xx,yy) position(xx,yy)
yy++ yy++
%asm {{ %asm {{
ldx color ldx p8v_color
lda cx16.VERA_DATA1 lda cx16.VERA_DATA1
sta P8ZP_SCRATCH_B1 sta P8ZP_SCRATCH_B1
ldy #8 ldy #8

View File

@ -14,7 +14,7 @@
graphics { graphics {
%option no_symbol_prefixing, ignore_unused %option ignore_unused
romsub $feff = FB_cursor_position2() clobbers(A,X,Y) ; alias for the normal FB_cursor_position() call but reuses existing r0 and r1 romsub $feff = FB_cursor_position2() clobbers(A,X,Y) ; alias for the normal FB_cursor_position() call but reuses existing r0 and r1
@ -158,7 +158,7 @@ graphics {
inline asmsub plot(uword plotx @R0, uword ploty @R1) clobbers(A, X, Y) { inline asmsub plot(uword plotx @R0, uword ploty @R1) clobbers(A, X, Y) {
%asm {{ %asm {{
jsr cx16.FB_cursor_position jsr cx16.FB_cursor_position
lda graphics.stroke_color lda p8b_graphics.p8v_stroke_color
jsr cx16.FB_set_pixel jsr cx16.FB_set_pixel
}} }}
} }

View File

@ -11,7 +11,7 @@
monogfx { monogfx {
%option no_symbol_prefixing, ignore_unused %option ignore_unused
; read-only control variables: ; read-only control variables:
uword width = 0 uword width = 0
@ -107,11 +107,11 @@ monogfx {
; just use 2 byte writes with shifted mask ; just use 2 byte writes with shifted mask
position2(xx,yy,true) position2(xx,yy,true)
%asm {{ %asm {{
ldy length ldy p8v_length
lda masked_ends,y lda p8v_masked_ends,y
sta cx16.r0L ; save left byte sta cx16.r0L ; save left byte
stz P8ZP_SCRATCH_B1 stz P8ZP_SCRATCH_B1
lda xx lda p8v_xx
and #7 and #7
beq + beq +
tay tay
@ -122,10 +122,10 @@ monogfx {
bne - bne -
sta cx16.r0L ; new left byte sta cx16.r0L ; new left byte
+ +
lda dont_stipple_flag lda p8v_dont_stipple_flag
bne _dontstipple bne _dontstipple
; determine stipple pattern ; determine stipple pattern
lda yy lda p8v_yy
and #1 and #1
beq + beq +
lda #%10101010 lda #%10101010
@ -139,7 +139,7 @@ monogfx {
and P8ZP_SCRATCH_REG and P8ZP_SCRATCH_REG
sta P8ZP_SCRATCH_B1 sta P8ZP_SCRATCH_B1
_dontstipple _dontstipple
lda draw lda p8v_draw
beq _clear beq _clear
lda cx16.r0L ; left byte lda cx16.r0L ; left byte
ora cx16.VERA_DATA1 ora cx16.VERA_DATA1
@ -184,34 +184,34 @@ _clear
separate_pixels = lsb(length) & 7 separate_pixels = lsb(length) & 7
xx += length & $fff8 xx += length & $fff8
%asm {{ %asm {{
lsr length+1 lsr p8v_length+1
ror length ror p8v_length
lsr length+1 lsr p8v_length+1
ror length ror p8v_length
lsr length+1 lsr p8v_length+1
ror length ror p8v_length
lda draw lda p8v_draw
bne + bne +
ldy #0 ; black ldy #0 ; black
bra _loop bra _loop
+ lda dont_stipple_flag + lda p8v_dont_stipple_flag
beq _stipple beq _stipple
ldy #255 ; don't stipple ldy #255 ; don't stipple
bra _loop bra _loop
_stipple lda yy _stipple lda p8v_yy
and #1 ; determine stipple pattern to use and #1 ; determine stipple pattern to use
bne + bne +
ldy #%01010101 ldy #%01010101
bra _loop bra _loop
+ ldy #%10101010 + ldy #%10101010
_loop lda length _loop lda p8v_length
ora length+1 ora p8v_length+1
beq _done beq _done
sty cx16.VERA_DATA0 sty cx16.VERA_DATA0
lda length lda p8v_length
bne + bne +
dec length+1 dec p8v_length+1
+ dec length + dec p8v_length
bra _loop bra _loop
_done _done
}} }}
@ -554,9 +554,9 @@ _done
if draw { if draw {
; solid color or perhaps stipple ; solid color or perhaps stipple
%asm {{ %asm {{
lda xx lda p8v_xx
eor yy eor p8v_yy
ora dont_stipple_flag ora p8v_dont_stipple_flag
and #1 and #1
}} }}
if_nz { if_nz {
@ -575,7 +575,7 @@ _done
sub prepare() { sub prepare() {
%asm {{ %asm {{
lda xx lda p8v_xx
and #7 and #7
pha ; xbits pha ; xbits
}} }}
@ -587,12 +587,12 @@ _done
%asm {{ %asm {{
stz cx16.VERA_CTRL stz cx16.VERA_CTRL
stz cx16.VERA_ADDR_H stz cx16.VERA_ADDR_H
lda xx+1 lda p8v_xx+1
sta cx16.VERA_ADDR_M sta cx16.VERA_ADDR_M
lda xx lda p8v_xx
sta cx16.VERA_ADDR_L sta cx16.VERA_ADDR_L
ply ; xbits ply ; xbits
lda maskbits,y lda p8v_maskbits,y
}} }}
} }
} }
@ -608,7 +608,7 @@ _done
sub pget(uword @zp xx, uword yy) -> ubyte { sub pget(uword @zp xx, uword yy) -> ubyte {
%asm {{ %asm {{
lda xx lda p8v_xx
and #7 and #7
pha ; xbits pha ; xbits
}} }}
@ -621,12 +621,12 @@ _done
%asm {{ %asm {{
stz cx16.VERA_CTRL stz cx16.VERA_CTRL
stz cx16.VERA_ADDR_H stz cx16.VERA_ADDR_H
lda xx+1 lda p8v_xx+1
sta cx16.VERA_ADDR_M sta cx16.VERA_ADDR_M
lda xx lda p8v_xx
sta cx16.VERA_ADDR_L sta cx16.VERA_ADDR_L
ply ; xbits ply ; xbits
lda plot.maskbits,y lda p8s_plot.p8v_maskbits,y
and cx16.VERA_DATA0 and cx16.VERA_DATA0
beq + beq +
lda #1 lda #1
@ -662,21 +662,21 @@ _done
;; cx16.r12L++ ;; cx16.r12L++
%asm {{ %asm {{
ldy cx16.r12L ldy cx16.r12L
lda sxl lda p8v_sxl
sta stack_xl_lsb,y sta p8v_stack_xl_lsb,y
lda sxl+1 lda p8v_sxl+1
sta stack_xl_msb,y sta p8v_stack_xl_msb,y
lda sxr lda p8v_sxr
sta stack_xr_lsb,y sta p8v_stack_xr_lsb,y
lda sxr+1 lda p8v_sxr+1
sta stack_xr_msb,y sta p8v_stack_xr_msb,y
lda sy lda p8v_sy
sta stack_y_lsb,y sta p8v_stack_y_lsb,y
lda sy+1 lda p8v_sy+1
sta stack_y_msb,y sta p8v_stack_y_msb,y
ldy cx16.r12L ldy cx16.r12L
lda sdy lda p8v_sdy
sta stack_dy,y sta p8v_stack_dy,y
inc cx16.r12L inc cx16.r12L
}} }}
} }
@ -690,21 +690,21 @@ _done
%asm {{ %asm {{
dec cx16.r12L dec cx16.r12L
ldy cx16.r12L ldy cx16.r12L
lda stack_xl_lsb,y lda p8v_stack_xl_lsb,y
sta x1 sta p8v_x1
lda stack_xl_msb,y lda p8v_stack_xl_msb,y
sta x1+1 sta p8v_x1+1
lda stack_xr_lsb,y lda p8v_stack_xr_lsb,y
sta x2 sta p8v_x2
lda stack_xr_msb,y lda p8v_stack_xr_msb,y
sta x2+1 sta p8v_x2+1
lda stack_y_lsb,y lda p8v_stack_y_lsb,y
sta yy sta p8v_yy
lda stack_y_msb,y lda p8v_stack_y_msb,y
sta yy+1 sta p8v_yy+1
ldy cx16.r12L ldy cx16.r12L
lda stack_dy,y lda p8v_stack_dy,y
sta dy sta p8v_dy
}} }}
yy+=dy yy+=dy
} }
@ -797,7 +797,7 @@ skip:
cx16.vaddr_autoincr(charset_bank, chardataptr, 0, 1) cx16.vaddr_autoincr(charset_bank, chardataptr, 0, 1)
%asm {{ %asm {{
; pre-shift the bits ; pre-shift the bits
lda text.xx lda p8s_text.p8v_xx
and #7 and #7
sta P8ZP_SCRATCH_B1 sta P8ZP_SCRATCH_B1
ldy #0 ldy #0
@ -810,9 +810,9 @@ skip:
ror P8ZP_SCRATCH_REG ror P8ZP_SCRATCH_REG
dex dex
bne - bne -
+ sta char_bitmap_bytes_left,y + sta p8v_char_bitmap_bytes_left,y
lda P8ZP_SCRATCH_REG lda P8ZP_SCRATCH_REG
sta char_bitmap_bytes_right,y sta p8v_char_bitmap_bytes_right,y
iny iny
cpy #8 cpy #8
bne -- bne --
@ -823,7 +823,7 @@ skip:
if draw { if draw {
%asm {{ %asm {{
ldy #0 ldy #0
- lda char_bitmap_bytes_left,y - lda p8v_char_bitmap_bytes_left,y
ora cx16.VERA_DATA1 ora cx16.VERA_DATA1
sta cx16.VERA_DATA0 sta cx16.VERA_DATA0
iny iny
@ -833,7 +833,7 @@ skip:
} else { } else {
%asm {{ %asm {{
ldy #0 ldy #0
- lda char_bitmap_bytes_left,y - lda p8v_char_bitmap_bytes_left,y
eor #255 eor #255
and cx16.VERA_DATA1 and cx16.VERA_DATA1
sta cx16.VERA_DATA0 sta cx16.VERA_DATA0
@ -849,7 +849,7 @@ skip:
if draw { if draw {
%asm {{ %asm {{
ldy #0 ldy #0
- lda char_bitmap_bytes_right,y - lda p8v_char_bitmap_bytes_right,y
ora cx16.VERA_DATA1 ora cx16.VERA_DATA1
sta cx16.VERA_DATA0 sta cx16.VERA_DATA0
iny iny
@ -859,7 +859,7 @@ skip:
} else { } else {
%asm {{ %asm {{
ldy #0 ldy #0
- lda char_bitmap_bytes_right,y - lda p8v_char_bitmap_bytes_right,y
eor #255 eor #255
and cx16.VERA_DATA1 and cx16.VERA_DATA1
sta cx16.VERA_DATA0 sta cx16.VERA_DATA0

View File

@ -3,7 +3,7 @@
; The first 16 colors can be restored to their default with set_default16() ; The first 16 colors can be restored to their default with set_default16()
palette { palette {
%option no_symbol_prefixing, ignore_unused %option ignore_unused
uword vera_palette_ptr uword vera_palette_ptr

View File

@ -1,7 +1,7 @@
%import syslib %import syslib
psg { psg {
%option no_symbol_prefixing, ignore_unused %option ignore_unused
; $1F9C0 - $1F9FF 16 blocks of 4 PSG registers (16 voices) ; $1F9C0 - $1F9FF 16 blocks of 4 PSG registers (16 voices)
; 00 frequency word LSB ; 00 frequency word LSB

View File

@ -7,6 +7,8 @@
; note: collision mask is not supported here yet. ; note: collision mask is not supported here yet.
sprites { sprites {
%option ignore_unused
const ubyte SIZE_8 = 0 const ubyte SIZE_8 = 0
const ubyte SIZE_16 = 1 const ubyte SIZE_16 = 1
const ubyte SIZE_32 = 2 const ubyte SIZE_32 = 2

View File

@ -7,7 +7,7 @@
monogfx { monogfx {
%option no_symbol_prefixing, ignore_unused %option ignore_unused
; read-only control variables: ; read-only control variables:
uword width = 0 uword width = 0

View File

@ -17,6 +17,7 @@ main {
angley+=215 angley+=215
anglez+=453 anglez+=453
sys.waitvsync() sys.waitvsync()
sys.waitvsync()
} }
} }

View File

@ -1,29 +1,21 @@
%import math %import math
%import string
%import emudbg
%import palette
%import floats
%import textio %import textio
%zeropage dontuse %zeropage dontuse
main { main {
sub start() { sub start() {
uword @shared x = 65535 emudbg.console_value1(123)
word @shared y = x as word emudbg.console_value2(99)
txt.print_w(y) emudbg.console_chrout('@')
txt.nl() emudbg.console_chrout('h')
txt.print_w(x as word) emudbg.console_chrout('e')
txt.nl() emudbg.console_chrout('l')
emudbg.console_chrout('l')
word @shared x2 = -1 emudbg.console_chrout('o')
uword @shared y2 = x2 as uword emudbg.console_chrout('\n')
txt.print_uw(y2)
txt.nl()
txt.print_uw(x2 as uword)
txt.nl()
txt.print_uw(shiftluw1())
} }
; sub shiftluw1() -> uword {
; uword q = $a49f
; return (q << 1) & 65535 as uword
; }
} }