fix colorbars example issue with memcopy due to overlapping buffers

This commit is contained in:
Irmen de Jong 2022-04-01 00:54:06 +02:00
parent ea43c34de8
commit f7431f809e
2 changed files with 10 additions and 9 deletions

View File

@ -3,11 +3,10 @@ TODO
For next release
^^^^^^^^^^^^^^^^
- x16: new vera memory layout https://github.com/commanderx16/x16-rom/issues/185
(partly)broken examples: colorbars (no bars), testvtui (VTUI lib not updated for new r39 yet)
- fix assembler application compiler crash
- x16: optimize diskio load_raw because headerless files are now supported https://github.com/commanderx16/x16-rom/pull/216
note: must still work on c64/c128 that don't have this!
- x16: fix the separate applications as well (assembler, ...)
- x16: fix wormfood (requires new VTUI lib)
- vm codegen: When
- vm codegen: Pipe expression

View File

@ -72,15 +72,17 @@ irq {
sub make_new_gradient() {
colors.random_half_bar()
colors.mirror_bar()
sys.memcopy(colors.reds, &blinds_lines_reds+32+16, len(colors.reds))
sys.memcopy(colors.greens, &blinds_lines_greens+32+16, len(colors.greens))
sys.memcopy(colors.blues, &blinds_lines_blues+32+16, len(colors.blues))
; can't use sys.memcopy due to overlapping buffer
cx16.memory_copy(colors.reds, &blinds_lines_reds+32+16, len(colors.reds))
cx16.memory_copy(colors.greens, &blinds_lines_greens+32+16, len(colors.greens))
cx16.memory_copy(colors.blues, &blinds_lines_blues+32+16, len(colors.blues))
}
sub shift_gradient() {
sys.memcopy(&blinds_lines_reds+1, blinds_lines_reds, len(blinds_lines_reds)-1)
sys.memcopy(&blinds_lines_greens+1, blinds_lines_greens, len(blinds_lines_greens)-1)
sys.memcopy(&blinds_lines_blues+1, blinds_lines_blues, len(blinds_lines_blues)-1)
; can't use sys.memcopy due to overlapping buffer
cx16.memory_copy(&blinds_lines_reds+1, blinds_lines_reds, len(blinds_lines_reds)-1)
cx16.memory_copy(&blinds_lines_greens+1, blinds_lines_greens, len(blinds_lines_greens)-1)
cx16.memory_copy(&blinds_lines_blues+1, blinds_lines_blues, len(blinds_lines_blues)-1)
}
asmsub set_scanline_color(ubyte color_ix @Y) {