x16 r39: cx16.screen_set_mode() -> cx16.screen_mode()

This commit is contained in:
Irmen de Jong 2022-03-31 18:17:28 +02:00
parent 6ddb7453e1
commit 86a7200012
11 changed files with 12 additions and 13 deletions

View File

@ -14,14 +14,14 @@ graphics {
sub enable_bitmap_mode() { sub enable_bitmap_mode() {
; enable bitmap screen, erase it and set colors to black/white. ; 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) cx16.GRAPH_init(0)
clear_screen(1, 0) clear_screen(1, 0)
} }
sub disable_bitmap_mode() { sub disable_bitmap_mode() {
; enables text mode, erase the text screen, color white ; 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 txt.fill_screen(' ', 1) ; doesn't seem to fully clear the text screen after returning from gfx mode
} }

View File

@ -294,7 +294,7 @@ cx16 {
romsub $ff4a = close_all(ubyte device @A) clobbers(A,X,Y) romsub $ff4a = close_all(ubyte device @A) clobbers(A,X,Y)
romsub $ff59 = lkupla(ubyte la @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 $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() 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) ; not yet supported: romsub $ff65 = pfkey() clobbers(A,X,Y)
romsub $ff6e = jsrfar() romsub $ff6e = jsrfar()

View File

@ -3,7 +3,6 @@ TODO
For next release 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 - 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? 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 - x16: check new ZP free addresses https://github.com/commanderx16/x16-docs/commit/541f2ce9e61d1d0d0e157d7f52fe16bc0895e6f0

View File

@ -8,7 +8,7 @@
main { main {
sub start() { 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") txt.print("\n\n how many sprites does\n the commander x16 have?\n")
sys.wait(120) sys.wait(120)
txt.print("\n\n the manual says: '128'.\n") txt.print("\n\n the manual says: '128'.\n")

View File

@ -16,7 +16,7 @@ main {
uword angley uword angley
uword anglez uword anglez
void cx16.screen_set_mode($80) void cx16.screen_mode($80, false)
cx16.GRAPH_init(0) cx16.GRAPH_init(0)
cx16.GRAPH_set_colors(13, 6, 6) cx16.GRAPH_set_colors(13, 6, 6)
cx16.GRAPH_clear() cx16.GRAPH_clear()
@ -27,7 +27,7 @@ main {
cx16.GRAPH_set_colors(0, 0, 0) cx16.GRAPH_set_colors(0, 0, 0)
; cx16.GRAPH_clear() ; 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) cx16.GRAPH_set_colors(1, 0, 0)
draw_lines_hiddenremoval() draw_lines_hiddenremoval()

View File

@ -6,7 +6,7 @@
main { main {
sub start() { sub start() {
; make palette color 1 black so we can print black letters over the background color 0 ; 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, $fa02, $0)
cx16.vpoke(1, $fa03, $0) cx16.vpoke(1, $fa03, $0)
txt.color(1) txt.color(1)

View File

@ -22,7 +22,7 @@ main {
; Not yet implemented in ROM: cx16.FB_set_palette(&colors, 0, len(colors)*3) ; Not yet implemented in ROM: cx16.FB_set_palette(&colors, 0, len(colors)*3)
palette.set_rgb(&colors, len(colors)) 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.FB_init()
cx16.VERA_DC_VSCALE = 0 ; display trick spoiler.......: stretch display all the way to the bottom cx16.VERA_DC_VSCALE = 0 ; display trick spoiler.......: stretch display all the way to the bottom
cx16.set_rasterirq(&irq.irqhandler, 0) cx16.set_rasterirq(&irq.irqhandler, 0)

View File

@ -54,7 +54,7 @@ main {
} }
sub initialize() { sub initialize() {
void cx16.screen_set_mode($80) void cx16.screen_mode($80, false)
txt.plot(32, 5) txt.plot(32, 5)
txt.print("256*240") txt.print("256*240")

View File

@ -6,7 +6,7 @@ main {
sub start() { sub start() {
; palette.set_rgb(&colors, len(colors)) ; 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.FB_init()

View File

@ -8,7 +8,7 @@
main { main {
sub start() { sub start() {
void cx16.screen_set_mode(0) void cx16.screen_mode(3, false)
txt.plot(14,14) txt.plot(14,14)
txt.print("raster bars!") txt.print("raster bars!")

View File

@ -32,7 +32,7 @@ main {
sub start() { sub start() {
void cx16.screen_set_mode(0) ; low res void cx16.screen_mode(3, false) ; low res
sound.init() sound.init()
newGame() newGame()
drawBoard() drawBoard()