Jo Engine 2026.11.1
Jo Sega Saturn Engine
Loading...
Searching...
No Matches
vdp2.h
Go to the documentation of this file.
1/*
2** Jo Sega Saturn Engine
3** Copyright (c) 2012-2026, Johannes Fetz (johannesfetz@gmail.com)
4** All rights reserved.
5**
6** Redistribution and use in source and binary forms, with or without
7** modification, are permitted provided that the following conditions are met:
8** * Redistributions of source code must retain the above copyright
9** notice, this list of conditions and the following disclaimer.
10** * Redistributions in binary form must reproduce the above copyright
11** notice, this list of conditions and the following disclaimer in the
12** documentation and/or other materials provided with the distribution.
13** * Neither the name of the Johannes Fetz nor the
14** names of its contributors may be used to endorse or promote products
15** derived from this software without specific prior written permission.
16**
17** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20** DISCLAIMED. IN NO EVENT SHALL Johannes Fetz BE LIABLE FOR ANY
21** DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24** ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27*/
34
35 /*
36 ▲ IMPORTANT NOTE ABOUT VDP2 USAGE (extract from ST-058-R2-060194.pdf p61):
37 Depending on the color count of NBG0 and NBG1, the scroll screen that cannot be displayed will appear.
38
39 - When NBG0 is set as 2048 or 32768 colors, NBG2 can not longer be displayed.
40 - When NBG0 is set at 16,770,000 colors, NBG1 to NBG3 can not longer be displayed.
41 - When NBG1 is set at 2048 or 32768 colors, NBG3 can longer be displayed.
42 */
43
44#ifndef __JO_VDP2_H__
45# define __JO_VDP2_H__
46
53int sprintf(char* str, const char* format, ...);
54
59
63void jo_set_displayed_screens(const jo_scroll_screen scroll_screen_flags);
64
68void jo_set_default_background_color(const jo_color background_color);
69
75void jo_set_background_line_colors(const jo_color * const colors);
76
77/*
78███╗ ██╗██████╗ ██████╗ ██████╗ ██╗██████╗ ███████╗ ██████╗ ███╗ ██╗████████╗
79████╗ ██║██╔══██╗██╔════╝ ╚════██╗ ██╔╝╚════██╗ ██╔════╝██╔═══██╗████╗ ██║╚══██╔══╝
80██╔██╗ ██║██████╔╝██║ ███╗ █████╔╝ ██╔╝ █████╔╝ █████╗ ██║ ██║██╔██╗ ██║ ██║
81██║╚██╗██║██╔══██╗██║ ██║██╔═══╝ ██╔╝ ╚═══██╗ ██╔══╝ ██║ ██║██║╚██╗██║ ██║
82██║ ╚████║██████╔╝╚██████╔╝███████╗██╔╝ ██████╔╝ ██║ ╚██████╔╝██║ ╚████║ ██║
83╚═╝ ╚═══╝╚═════╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═╝
84*/
85
86#ifndef JO_COMPILE_WITH_PRINTF_SUPPORT
87
93void jo_nbg2_print(int x, int y, char * str);
94
100# define jo_nbg2_printf(X, Y, ...) do {jo_sprintf(__jo_sprintf_buf, __VA_ARGS__); jo_nbg2_print(X, Y, __jo_sprintf_buf); } while(0)
101
110void jo_vdp2_set_nbg2_8bits_font(jo_img_8bits *img, char *mapping, int palette_id, bool vertical_flip, bool enabled);
111
114void jo_nbg2_clear(void);
115
121void jo_nbg3_print(int x, int y, char * str);
122
128# define jo_nbg3_printf(X, Y, ...) do {jo_sprintf(__jo_sprintf_buf, __VA_ARGS__); jo_nbg3_print(X, Y, __jo_sprintf_buf); } while(0)
129
138void jo_vdp2_set_nbg3_8bits_font(jo_img_8bits *img, char *mapping, int palette_id, bool vertical_flip, bool enabled);
139
142void jo_nbg3_clear(void);
143
144#endif
145
146/*
147██████╗ ██████╗ █████╗ ██╗ ██╗ ██╗███╗ ███╗ █████╗ ██████╗ ███████╗
148██╔══██╗██╔══██╗██╔══██╗██║ ██║ ██║████╗ ████║██╔══██╗██╔════╝ ██╔════╝
149██║ ██║██████╔╝███████║██║ █╗ ██║ ██║██╔████╔██║███████║██║ ███╗█████╗
150██║ ██║██╔══██╗██╔══██║██║███╗██║ ██║██║╚██╔╝██║██╔══██║██║ ██║██╔══╝
151██████╔╝██║ ██║██║ ██║╚███╔███╔╝ ██║██║ ╚═╝ ██║██║ ██║╚██████╔╝███████╗
152╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚══╝╚══╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ ╚══════╝
153
154*/
155
162void jo_vdp2_set_nbg1_8bits_image(jo_img_8bits *img, int palette_id, bool vertical_flip);
163
172void jo_vdp2_set_nbg1_8bits_image_repeat(jo_img_8bits *img, int palette_id, bool vertical_flip, bool repeat);
173
174#ifndef JO_COMPILE_WITH_PRINTF_SUPPORT
182void jo_vdp2_set_nbg0_8bits_image(jo_img_8bits *img, int palette_id, bool vertical_flip, bool enabled);
183#endif
184
192void jo_vdp2_set_nbg2_8bits_image(jo_img_8bits *img, int palette_id, bool vertical_flip, bool enabled);
193
201void jo_vdp2_set_nbg3_8bits_image(jo_img_8bits *img, int palette_id, bool vertical_flip, bool enabled);
202
208void jo_vdp2_set_nbg1_image(const jo_img * const img, short left, short top);
209
212
221
226
235void __jo_vdp2_nbg1_bitmap_fill(const int x, const int y, int width, int height, const jo_color color);
236
247void __jo_vdp2_nbg1_bitmap_blit(const jo_img * const img, const int src_x, const int src_y, int width, int height, const int x, const int y);
248
249/*
250███╗ ███╗ ██████╗ ██╗ ██╗███████╗ ██╗ ███████╗ ██████╗ ██████╗ ███╗ ███╗
251████╗ ████║██╔═══██╗██║ ██║██╔════╝ ██║ ╚══███╔╝██╔═══██╗██╔═══██╗████╗ ████║
252██╔████╔██║██║ ██║██║ ██║█████╗ ████████╗ ███╔╝ ██║ ██║██║ ██║██╔████╔██║
253██║╚██╔╝██║██║ ██║╚██╗ ██╔╝██╔══╝ ██╔═██╔═╝ ███╔╝ ██║ ██║██║ ██║██║╚██╔╝██║
254██║ ╚═╝ ██║╚██████╔╝ ╚████╔╝ ███████╗ ██████║ ███████╗╚██████╔╝╚██████╔╝██║ ╚═╝ ██║
255╚═╝ ╚═╝ ╚═════╝ ╚═══╝ ╚══════╝ ╚═════╝ ╚══════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝
256
257*/
258
263void jo_vdp2_move_nbg1(const int x, const int y);
264
269void jo_vdp2_zoom_nbg1f(const float width_factor, const float height_factor);
270
274static __jo_force_inline void jo_vdp2_zoom_nbg1(const float factor)
275{
276 jo_vdp2_zoom_nbg1f(factor, factor);
277}
278
283void jo_vdp2_move_nbg0(const int x, const int y);
284
289void jo_vdp2_zoom_nbg0f(const float width_factor, const float height_factor);
290
294static __jo_force_inline void jo_vdp2_zoom_nbg0(const float factor)
295{
296 jo_vdp2_zoom_nbg0f(factor, factor);
297}
298
299/*
300██████╗ █████╗ ███████╗██╗ ██████╗ ██████╗ ██████╗ █████╗ ██╗ ██╗██╗███╗ ██╗ ██████╗
301██╔══██╗██╔══██╗██╔════╝██║██╔════╝ ██╔══██╗██╔══██╗██╔══██╗██║ ██║██║████╗ ██║██╔════╝
302██████╔╝███████║███████╗██║██║ ██║ ██║██████╔╝███████║██║ █╗ ██║██║██╔██╗ ██║██║ ███╗
303██╔══██╗██╔══██║╚════██║██║██║ ██║ ██║██╔══██╗██╔══██║██║███╗██║██║██║╚██╗██║██║ ██║
304██████╔╝██║ ██║███████║██║╚██████╗ ██████╔╝██║ ██║██║ ██║╚███╔███╔╝██║██║ ╚████║╚██████╔╝
305╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚══╝╚══╝ ╚═╝╚═╝ ╚═══╝ ╚═════╝
306*
307** ▲ ONLY WORKS IN BITMAP MODE
308*/
309
317void jo_vdp2_draw_bitmap_nbg1_line(int x0, int y0, int x1, int y1, const jo_color color);
318
326static __jo_force_inline void jo_vdp2_draw_bitmap_nbg1_square(const int x, const int y, const short width, const short height, const jo_color color)
327{
328 jo_vdp2_draw_bitmap_nbg1_line(x, y, x + width, y, color);
329 jo_vdp2_draw_bitmap_nbg1_line(x + width, y + height, x + width, y, color);
330 jo_vdp2_draw_bitmap_nbg1_line(x, y + height, x + width, y + height, color);
331 jo_vdp2_draw_bitmap_nbg1_line(x, y + height, x, y, color);
332}
333
339static __jo_force_inline void jo_vdp2_put_pixel_bitmap_nbg1(const int x, const int y, const jo_color color)
340{
341 // (the bitmap at its first use, see __jo_vdp2_reserve_nbg1_bitmap())
343 return;
344 *(((unsigned short *)JO_VDP2_VRAM_A0) + x + y * JO_VDP2_WIDTH) = color;
345}
346
354static __jo_force_inline void jo_vdp2_put_pixel_bitmap_nbg1_rgb(const int x, const int y, unsigned char r, unsigned char g, unsigned char b)
355{
357}
358
359/*
360██████╗ ██████╗ ██████╗ ██╗ █████╗ ███╗ ██╗███████╗███████╗
361╚════██╗██╔══██╗ ██╔══██╗██║ ██╔══██╗████╗ ██║██╔════╝██╔════╝
362 █████╔╝██║ ██║ ██████╔╝██║ ███████║██╔██╗ ██║█████╗ ███████╗
363 ╚═══██╗██║ ██║ ██╔═══╝ ██║ ██╔══██║██║╚██╗██║██╔══╝ ╚════██║
364██████╔╝██████╔╝ ██║ ███████╗██║ ██║██║ ╚████║███████╗███████║
365╚═════╝ ╚═════╝ ╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═══╝╚══════╝╚══════╝
366** - Two planes are available: A and B
367** - Each plane is 512 x 512 size
368*/
369
373
378void jo_vdp2_set_rbg0_far_limit(const int max_zoom_out);
379
383
391void jo_vdp2_set_rbg0_plane_a_8bits_image(jo_img_8bits *img, int palette_id, bool repeat, bool vertical_flip);
392
400void jo_vdp2_set_rbg0_plane_b_8bits_image(jo_img_8bits *img, int palette_id, bool repeat, bool vertical_flip);
401
409
417
418
422void jo_vdp2_draw_rbg0_plane_a(const bool use_scroll_format_matrix);
423
427void jo_vdp2_draw_rbg0_plane_b(const bool use_scroll_format_matrix);
428
438void jo_vdp2_draw_rbg0_plane_b_flat(const int x, const int y);
439
440
441/*
442███╗ ███╗ ██████╗ ███████╗ █████╗ ██╗ ██████╗
443████╗ ████║██╔═══██╗╚══███╔╝██╔══██╗██║██╔════╝
444██╔████╔██║██║ ██║ ███╔╝ ███████║██║██║
445██║╚██╔╝██║██║ ██║ ███╔╝ ██╔══██║██║██║
446██║ ╚═╝ ██║╚██████╔╝███████╗██║ ██║██║╚██████╗
447╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═════╝
448*/
449
450
457void jo_enable_screen_mozaic(const jo_scroll_screen screens, short x, short y);
458
462
463
464/*
465██╗ ██╗ ██████╗ ██████╗ ██╗███████╗ ██████╗ ███╗ ██╗████████╗ █████╗ ██╗
466██║ ██║██╔═══██╗██╔══██╗██║╚══███╔╝██╔═══██╗████╗ ██║╚══██╔══╝██╔══██╗██║
467███████║██║ ██║██████╔╝██║ ███╔╝ ██║ ██║██╔██╗ ██║ ██║ ███████║██║
468██╔══██║██║ ██║██╔══██╗██║ ███╔╝ ██║ ██║██║╚██╗██║ ██║ ██╔══██║██║
469██║ ██║╚██████╔╝██║ ██║██║███████╗╚██████╔╝██║ ╚████║ ██║ ██║ ██║███████╗
470╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝╚══════╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝╚══════╝
471
472██╗ ██╗███╗ ██╗███████╗ ███████╗ ██████╗██████╗ ██████╗ ██╗ ██╗
473██║ ██║████╗ ██║██╔════╝ ██╔════╝██╔════╝██╔══██╗██╔═══██╗██║ ██║
474██║ ██║██╔██╗ ██║█████╗ ███████╗██║ ██████╔╝██║ ██║██║ ██║
475██║ ██║██║╚██╗██║██╔══╝ ╚════██║██║ ██╔══██╗██║ ██║██║ ██║
476███████╗██║██║ ╚████║███████╗ ███████║╚██████╗██║ ██║╚██████╔╝███████╗███████╗
477╚══════╝╚═╝╚═╝ ╚═══╝╚══════╝ ╚══════╝ ╚═════╝╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚══════╝
478
479▲ ONLY WORKS IF BACKGROUND IMAGE IS LOADED THROUH jo_vdp2_set_nbg1_8bits_image() ▲
480 OTHERWISE IT MAY GLITCH
481*/
482
485# define JO_NBG1_SCROLL_TABLE_SIZE (512)
486
492
496
500void jo_vdp2_compute_nbg1_line_scroll(unsigned short offset);
501
505# define JO_NBG1_VERTICAL_CELL_SCROLL_TABLE_SIZE (64)
506
515
519
522# define JO_NBG0_SCROLL_TABLE_SIZE (512)
523
529
533
537void jo_vdp2_compute_nbg0_line_scroll(unsigned short offset);
538
539/*
540████████╗██████╗ █████╗ ███╗ ██╗███████╗██████╗ █████╗ ██████╗ ███████╗███╗ ██╗ ██████╗██╗ ██╗
541╚══██╔══╝██╔══██╗██╔══██╗████╗ ██║██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝████╗ ██║██╔════╝╚██╗ ██╔╝
542 ██║ ██████╔╝███████║██╔██╗ ██║███████╗██████╔╝███████║██████╔╝█████╗ ██╔██╗ ██║██║ ╚████╔╝
543 ██║ ██╔══██╗██╔══██║██║╚██╗██║╚════██║██╔═══╝ ██╔══██║██╔══██╗██╔══╝ ██║╚██╗██║██║ ╚██╔╝
544 ██║ ██║ ██║██║ ██║██║ ╚████║███████║██║ ██║ ██║██║ ██║███████╗██║ ╚████║╚██████╗ ██║
545 ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═══╝╚══════╝╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═══╝ ╚═════╝ ╚═╝
546
547*/
548
552
557void jo_enable_screen_transparency(const jo_scroll_screen screen, const unsigned short transparency_level);
558
562# define JO_VDP2_ADDITIVE_SPRITE_BANK (0x6000)
563
572
575
576#endif /* !__JO_VDP2_H__ */
577
578/*
579** END OF FILE
580*/
#define JO_COLOR_SATURN_RGB(R, G, B)
Internal, you should not use this macro.
Definition colors.h:92
#define JO_PRINTF_BUF_SIZE
Max character in available in jo_printf().
Definition conf.h:157
#define JO_VDP2_WIDTH
VDP2 Background bitmap width.
Definition conf.h:151
#define JO_VDP2_VRAM_A0
VDP2 VRAM Bank A0 (128 kilobytes).
Definition sega_saturn.h:143
int sprintf(char *str, const char *format,...)
sprintf prototypes
char __jo_sprintf_buf[JO_PRINTF_BUF_SIZE]
Internal sprintf buffer.
#define __jo_force_inline
force inline attribute (and prevent Doxygen prototype parsing bug)
Definition types.h:39
unsigned short jo_color
15 bits color type
Definition types.h:42
jo_scroll_screen
Sega Saturn Scroll Screen Ids.
Definition types.h:322
15 bits image struct
Definition types.h:231
8 bits image struct
Definition types.h:239
void jo_enable_additive_sprites(void)
The light of the additive sprites is added to the image under them (the VDP2 color calculation "add",...
void jo_enable_screen_mozaic(const jo_scroll_screen screens, short x, short y)
Enable mozaic effect for scroll screen.
static __jo_force_inline void jo_vdp2_put_pixel_bitmap_nbg1(const int x, const int y, const jo_color color)
Put pixel in NBG1 using color.
Definition vdp2.h:339
void jo_vdp2_set_rbg0_plane_a_8bits_image(jo_img_8bits *img, int palette_id, bool repeat, bool vertical_flip)
Setup plane A.
void jo_nbg2_print(int x, int y, char *str)
NBG2 Print implementation.
void jo_vdp2_zoom_nbg1f(const float width_factor, const float height_factor)
Zoom NBG1 width and height independently.
void jo_vdp2_set_nbg2_8bits_image(jo_img_8bits *img, int palette_id, bool vertical_flip, bool enabled)
Set 8 bits NBG2 image.
void jo_nbg3_clear(void)
Clear NBG3.
void jo_set_displayed_screens(const jo_scroll_screen scroll_screen_flags)
Set displayed screens.
void jo_vdp2_draw_rbg0_plane_b(const bool use_scroll_format_matrix)
Draw plane B.
void jo_vdp2_zoom_nbg0f(const float width_factor, const float height_factor)
Zoom NBG0 width and height independently.
void jo_disable_additive_sprites(void)
The additive sprites are opaque again (see jo_enable_additive_sprites()).
void jo_vdp2_set_nbg3_8bits_image(jo_img_8bits *img, int palette_id, bool vertical_flip, bool enabled)
Set 8 bits NBG3 image.
void jo_set_background_line_colors(const jo_color *const colors)
Set a color for each line of the back screen (visible where no scroll screen is displayed).
void jo_vdp2_move_nbg1(const int x, const int y)
Move NBG1 (scrolling).
static __jo_force_inline void jo_vdp2_zoom_nbg0(const float factor)
Zoom NBG0.
Definition vdp2.h:294
void jo_vdp2_set_nbg3_8bits_font(jo_img_8bits *img, char *mapping, int palette_id, bool vertical_flip, bool enabled)
Set 8 bits NBG3 font image.
void jo_vdp2_draw_rbg0_plane_a(const bool use_scroll_format_matrix)
Draw plane A.
void jo_vdp2_disable_nbg0_line_scroll(void)
Disable NBG0 horizontal line scroll effect.
void jo_vdp2_set_nbg0_8bits_image(jo_img_8bits *img, int palette_id, bool vertical_flip, bool enabled)
Set 8 bits NBG0 image.
static __jo_force_inline void jo_vdp2_zoom_nbg1(const float factor)
Zoom NBG1.
Definition vdp2.h:274
void jo_vdp2_enable_rbg0(void)
Enable 3D planes.
int * jo_vdp2_enable_nbg1_line_scroll(void)
Enable NBG1 horizontal line scroll effect.
void jo_vdp2_set_rbg0_far_limit(const int max_zoom_out)
Hide the farthest part of the 3D planes (the back screen is visible instead).
void jo_vdp2_set_rbg0_plane_b_8bits_image(jo_img_8bits *img, int palette_id, bool repeat, bool vertical_flip)
Setup plane B.
void jo_vdp2_compute_nbg0_line_scroll(unsigned short offset)
Compute NBG0 horizontal line scroll effect using specific offset.
int * jo_vdp2_enable_nbg0_line_scroll(void)
Enable NBG0 horizontal line scroll effect.
bool __jo_vdp2_nbg1_bitmap_reserved
The NBG1 bitmap is in the VRAM (Internal usage, see __jo_vdp2_reserve_nbg1_bitmap()).
void __jo_vdp2_nbg1_bitmap_fill(const int x, const int y, int width, int height, const jo_color color)
Fill a rectangle in the NBG1 bitmap (Internal usage).
void jo_vdp2_replace_rbg0_plane_b_8bits_image(jo_img_8bits *img, bool vertical_flip)
Replace plane B image.
static __jo_force_inline void jo_vdp2_draw_bitmap_nbg1_square(const int x, const int y, const short width, const short height, const jo_color color)
Draw a square on NBG1.
Definition vdp2.h:326
bool __jo_vdp2_reserve_nbg1_bitmap(void)
Allocate and display the NBG1 bitmap at its first use (Internal usage).
void jo_vdp2_disable_rbg0(void)
Disable 3D planes.
void jo_vdp2_set_nbg1_image(const jo_img *const img, short left, short top)
Set NBG1 bitmap image.
void jo_disable_all_screen_mozaic(void)
Disable mozaic effect for all scroll screen.
void jo_vdp2_draw_rbg0_plane_b_flat(const int x, const int y)
Draw plane B as a flat image, without perspective: a sky behind the plane A (sea, ground).
void jo_vdp2_clear_bitmap_nbg1(const jo_color color)
Clear NBG1 bitmap.
void jo_vdp2_set_nbg1_8bits_image(jo_img_8bits *img, int palette_id, bool vertical_flip)
Add 8 bits NBG1 image.
void jo_set_default_background_color(const jo_color background_color)
Set default background color.
void jo_vdp2_disable_nbg1_line_scroll(void)
Disable NBG1 horizontal line scroll effect.
void __jo_vdp2_nbg1_bitmap_blit(const jo_img *const img, const int src_x, const int src_y, int width, int height, const int x, const int y)
Copy a part of an image in the NBG1 bitmap (Internal usage).
void jo_vdp2_draw_bitmap_nbg1_line(int x0, int y0, int x1, int y1, const jo_color color)
Draw a NBG1 line using Bresenham's line algorithm.
void jo_nbg2_clear(void)
Clear NBG2.
void jo_vdp2_set_nbg1_8bits_image_repeat(jo_img_8bits *img, int palette_id, bool vertical_flip, bool repeat)
Add 8 bits NBG1 image, repeated or not.
void jo_vdp2_compute_nbg1_line_scroll(unsigned short offset)
Compute NBG1 horizontal line scroll effect using specific offset.
static __jo_force_inline void jo_vdp2_put_pixel_bitmap_nbg1_rgb(const int x, const int y, unsigned char r, unsigned char g, unsigned char b)
Put pixel in NBG1 using composite color.
Definition vdp2.h:354
void jo_vdp2_replace_rbg0_plane_a_8bits_image(jo_img_8bits *img, bool vertical_flip)
Replace plane A image.
void jo_nbg3_print(int x, int y, char *str)
NBG3 Print implementation.
void jo_vdp2_disable_nbg1_vertical_cell_scroll(void)
Disable the NBG1 vertical cell scroll and free its table.
void jo_vdp2_move_nbg0(const int x, const int y)
Move NBG0 (scrolling).
void jo_enable_screen_transparency(const jo_scroll_screen screen, const unsigned short transparency_level)
Enable screen transparency.
void jo_disable_all_screens_transparency(void)
Disable all screens transparency.
int * jo_vdp2_enable_nbg1_vertical_cell_scroll(void)
Enable the NBG1 vertical cell scroll: each column of 8 pixels of the screen is moved vertically by it...
void jo_vdp2_set_nbg2_8bits_font(jo_img_8bits *img, char *mapping, int palette_id, bool vertical_flip, bool enabled)
Set 8 bits NBG2 font image.