diff --git a/compiler/res/prog8lib/cx16/graphics.p8 b/compiler/res/prog8lib/cx16/graphics.p8 index f8cb55b1f..453b0b3a4 100644 --- a/compiler/res/prog8lib/cx16/graphics.p8 +++ b/compiler/res/prog8lib/cx16/graphics.p8 @@ -14,14 +14,14 @@ graphics { sub enable_bitmap_mode() { ; enable bitmap screen, erase it and set colors to black/white. - void cx16.screen_set_mode($80) + void cx16.screen_mode($80, false) cx16.GRAPH_init(0) clear_screen(1, 0) } sub disable_bitmap_mode() { ; enables text mode, erase the text screen, color white - void cx16.screen_set_mode(2) + void cx16.screen_mode(0, false) txt.fill_screen(' ', 1) ; doesn't seem to fully clear the text screen after returning from gfx mode } diff --git a/compiler/res/prog8lib/cx16/syslib.p8 b/compiler/res/prog8lib/cx16/syslib.p8 index c19187d34..6f5df47f7 100644 --- a/compiler/res/prog8lib/cx16/syslib.p8 +++ b/compiler/res/prog8lib/cx16/syslib.p8 @@ -294,7 +294,7 @@ cx16 { romsub $ff4a = close_all(ubyte device @A) clobbers(A,X,Y) romsub $ff59 = lkupla(ubyte la @A) clobbers(A,X,Y) romsub $ff5c = lkupsa(ubyte sa @Y) clobbers(A,X,Y) -romsub $ff5f = screen_set_mode(ubyte mode @A) clobbers(A, X, Y) -> ubyte @Pc +romsub $ff5f = screen_mode(ubyte mode @A, ubyte getCurrent @Pc) clobbers(A, X, Y) -> ubyte @Pc romsub $ff62 = screen_set_charset(ubyte charset @A, uword charsetptr @XY) clobbers(A,X,Y) ; incompatible with C128 dlchr() ; not yet supported: romsub $ff65 = pfkey() clobbers(A,X,Y) romsub $ff6e = jsrfar() diff --git a/docs/source/todo.rst b/docs/source/todo.rst index 89381939c..3f0d60fed 100644 --- a/docs/source/todo.rst +++ b/docs/source/todo.rst @@ -3,7 +3,6 @@ TODO For next release ^^^^^^^^^^^^^^^^ -- x16: screen_set_mode -> screen_mode + other args https://github.com/commanderx16/x16-docs/blob/master/Commander%20X16%20Programmer's%20Reference%20Guide.md#function-name-screen_mode - x16: change mouse_config API https://github.com/commanderx16/x16-docs/blob/master/Commander%20X16%20Programmer's%20Reference%20Guide.md#function-name-mouse_config also add mouse_config2() ? that does the screen_mode() trick internally for you? - x16: check new ZP free addresses https://github.com/commanderx16/x16-docs/commit/541f2ce9e61d1d0d0e157d7f52fe16bc0895e6f0 diff --git a/examples/cx16/bobs.p8 b/examples/cx16/bobs.p8 index 404fb6657..28a9e7201 100644 --- a/examples/cx16/bobs.p8 +++ b/examples/cx16/bobs.p8 @@ -8,7 +8,7 @@ main { sub start() { - void cx16.screen_set_mode(0) + void cx16.screen_mode(3, false) txt.print("\n\n how many sprites does\n the commander x16 have?\n") sys.wait(120) txt.print("\n\n the manual says: '128'.\n") diff --git a/examples/cx16/cobramk3-gfx.p8 b/examples/cx16/cobramk3-gfx.p8 index a0f5d2213..f00353cb6 100644 --- a/examples/cx16/cobramk3-gfx.p8 +++ b/examples/cx16/cobramk3-gfx.p8 @@ -16,7 +16,7 @@ main { uword angley uword anglez - void cx16.screen_set_mode($80) + void cx16.screen_mode($80, false) cx16.GRAPH_init(0) cx16.GRAPH_set_colors(13, 6, 6) cx16.GRAPH_clear() @@ -27,7 +27,7 @@ main { cx16.GRAPH_set_colors(0, 0, 0) ; cx16.GRAPH_clear() - cx16.GRAPH_draw_rect(32, 10, 256, 220, 0, false) + cx16.GRAPH_draw_rect(32, 10, 256, 220, 0, true) cx16.GRAPH_set_colors(1, 0, 0) draw_lines_hiddenremoval() diff --git a/examples/cx16/colorbars.p8 b/examples/cx16/colorbars.p8 index 7bd6dd501..08463e5de 100644 --- a/examples/cx16/colorbars.p8 +++ b/examples/cx16/colorbars.p8 @@ -6,7 +6,7 @@ main { sub start() { ; make palette color 1 black so we can print black letters over the background color 0 - void cx16.screen_set_mode(0) + void cx16.screen_mode(3, false) cx16.vpoke(1, $fa02, $0) cx16.vpoke(1, $fa03, $0) txt.color(1) diff --git a/examples/cx16/kefrenbars.p8 b/examples/cx16/kefrenbars.p8 index 91e7a2d08..623f6f508 100644 --- a/examples/cx16/kefrenbars.p8 +++ b/examples/cx16/kefrenbars.p8 @@ -22,7 +22,7 @@ main { ; Not yet implemented in ROM: cx16.FB_set_palette(&colors, 0, len(colors)*3) palette.set_rgb(&colors, len(colors)) - void cx16.screen_set_mode(128) ; low-res bitmap 256 colors + void cx16.screen_mode(128, false) ; low-res bitmap 256 colors cx16.FB_init() cx16.VERA_DC_VSCALE = 0 ; display trick spoiler.......: stretch display all the way to the bottom cx16.set_rasterirq(&irq.irqhandler, 0) diff --git a/examples/cx16/mandelbrot-gfx-colors.p8 b/examples/cx16/mandelbrot-gfx-colors.p8 index 6a363138e..921e935aa 100644 --- a/examples/cx16/mandelbrot-gfx-colors.p8 +++ b/examples/cx16/mandelbrot-gfx-colors.p8 @@ -54,7 +54,7 @@ main { } sub initialize() { - void cx16.screen_set_mode($80) + void cx16.screen_mode($80, false) txt.plot(32, 5) txt.print("256*240") diff --git a/examples/cx16/multipalette.p8 b/examples/cx16/multipalette.p8 index 08106b41b..29ad52c40 100644 --- a/examples/cx16/multipalette.p8 +++ b/examples/cx16/multipalette.p8 @@ -6,7 +6,7 @@ main { sub start() { ; palette.set_rgb(&colors, len(colors)) - void cx16.screen_set_mode(128) ; low-res bitmap 256 colors + void cx16.screen_mode(128, false) ; low-res bitmap 256 colors cx16.FB_init() diff --git a/examples/cx16/rasterbars.p8 b/examples/cx16/rasterbars.p8 index 2ecb31bfc..6cbea7767 100644 --- a/examples/cx16/rasterbars.p8 +++ b/examples/cx16/rasterbars.p8 @@ -8,7 +8,7 @@ main { sub start() { - void cx16.screen_set_mode(0) + void cx16.screen_mode(3, false) txt.plot(14,14) txt.print("raster bars!") diff --git a/examples/cx16/tehtriz.p8 b/examples/cx16/tehtriz.p8 index 32cfc5ff7..fc0e0b7ca 100644 --- a/examples/cx16/tehtriz.p8 +++ b/examples/cx16/tehtriz.p8 @@ -32,7 +32,7 @@ main { sub start() { - void cx16.screen_set_mode(0) ; low res + void cx16.screen_mode(3, false) ; low res sound.init() newGame() drawBoard()