VDP display modes
VDP version enumaration
VRAM size enumaration
Initialize VDP module. [MSX1/2/2+/TR] Retreive BIOS initiale value. This function is called automatically when VDP_SetMode is called if the macro VDP_AUTO_INIT equals 1.
Clear the VRAM content. [MSX1/2/2+/TR]
| void VDP_SetMode( |
| ) |
Set screen mode. [MSX1/2/2+/TR]
| mode const u8 | The new screen mode to set (see VDP_MODE enumeration) |
Get current screen mode. [MSX1/2/2+/TR]
Current screen mode
| inline bool VDP_IsBitmapMode( |
| ) |
Tell if the given screen mode is a bitmap mode (pattern/text mode otherwise). [MSX1/2/2+/TR]
| mode const u8 | VDP mode to set (see VDP_MODE enumeration) |
TRUE if the given screen mode is a bitmap mode, FALSE otherwise.
| inline bool VDP_IsPatternMode( |
| ) |
Tell if the given screen mode is a pattern/text mode (bitmap mode otherwise). [MSX1/2/2+/TR]
| mode const u8 | VDP mode to set (see VDP_MODE enumeration) |
TRUE if the given screen mode is a pattern/text mode, FALSE otherwise.
| void VDP_SetModeFlag( |
| ) |
Set screen mode flag. [MSX1/2/2+/TR] VRAM tables address must be set to fit the new screen mode
| flag u8 | Screen binary flag |
| void VDP_RegWrite( |
| ) __PRESERVES(b, c, d, e, iyl, iyh) |
Set register value. [MSX1/2/2+/TR]
| reg u8 | Register number |
| value u8 | Value to set |
| void VDP_RegWriteBak( |
| ) __PRESERVES(d, e, iyl, iyh) |
Set register value after backuping previous value. [MSX1/2/2+/TR]
| reg u8 | Register number |
| value u8 | Value to set |
| void VDP_RegWriteBakMask( |
| ) |
Set register value after backuping previous value using mask. [MSX1/2/2+/TR]
| reg | Register number |
| mask u8 | Previous value reset mask |
| flag | Value to set |
Read default S#0 register. [MSX1/2/2+/TR]
Status register #0 value
| u8 VDP_ReadStatus( |
| ) __PRESERVES(b, c, d, e, h, iyl, iyh) |
Read a given status register then reset status register to default (0). [MSX2/2+/TR]
| stat u8 | Status register number (0-9) |
The given status register value
| void VDP_WriteVRAM_16K( |
| ) |
Write data from RAM to VRAM. [MSX1/2/2+/TR]
| src const u8* | Source data address in RAM |
| dest u16 | Destination address in VRAM (14bits address for 16KB VRAM) |
| count u16 | Number of byte to copy in VRAM. Note: A count of 0 mean 65536 |
| void VDP_FillVRAM_16K( |
| ) |
Fill VRAM area with a given value. [MSX1/2/2+/TR] Use fast 16-bits loop (28 cc)
| value u8 | Byte value to copy in VRAM |
| dest u16 | Destination address in VRAM (14 bits address form 16 KB VRAM) |
| count u16 | Number of byte to copy in VRAM. Note: A count of 0 mean 65536 |
| void VDP_FastFillVRAM_16K( |
| ) |
Fill VRAM area with a given value [MSX1/2/2+/TR] Use ultra fast 16-bits using 16 unrolled out loop (~14,9 cc)
| value u8 | Byte value to copy in VRAM |
| dest u16 | Destination address in VRAM (14 bits address form 16 KB VRAM) |
| count u16 | Nomber of byte to copy in VRAM. Note: A count of 0 mean 65536 |
| void VDP_ReadVRAM_16K( |
| ) |
Read data from VRAM to RAM. [MSX1/2/2+/TR]
| src u16 | Source address in VRAM (14bits address form 16KB VRAM) |
| dest u8* | Desitation data address in RAM |
| count u16 | Number of byte to copy from VRAM. Note: A count of 0 mean 65536 |
| void VDP_Poke_16K( |
| ) __PRESERVES(c, h, l, iyl, iyh) |
Write a value to VRAM. [MSX1/2/2+/TR]
| val u8 | Value to write in VRAM |
| dest u16 | Desitation address in VRAM (14bits address form 16KB VRAM) |
| u8 VDP_Peek_16K( |
| ) __PRESERVES(b, c, d, e, iyl, iyh) |
Read a value from VRAM. [MSX1/2/2+/TR]
| src u16 | Source address in VRAM (14bits address form 16KB VRAM) |
Value read in VRAM
| void VDP_WriteVRAM_128K( |
| ) |
Write data from RAM to VRAM. [MSX2/2+/TR]
| src const u8* | Source data address in RAM |
| destLow u16 | Destination address in VRAM (16 LSB of 17-bits VRAM address) |
| destHigh u8 | Destination address in VRAM (1 MSB of 17-bits VRAM address) |
| count u16 | Nomber of byte to copy in VRAM. Note: A count of 0 mean 65536 |
| void VDP_FillVRAM_128K( |
| ) |
Fill VRAM area with a given value. [MSX2/2+/TR]
| value u8 | Byte value to copy in VRAM |
| destLow u16 | Destination address in VRAM (16 LSB of 17-bits VRAM address) |
| destHigh u8 | Destination address in VRAM (1 MSB of 17-bits VRAM address) |
| count u16 | Nomber of byte to copy in VRAM. Note: A count of 0 mean 65536 |
| void VDP_ReadVRAM_128K( |
| ) |
Read data from VRAM to RAM. [MSX2/2+/TR]
| srcLow u16 | Source address in VRAM (16 LSB of 17-bits VRAM address) |
| srcHigh u8 | Source address in VRAM (1 MSB of 17-bits VRAM address) |
| dest u8* | Desitation data address in RAM |
| count u16 | Nomber of byte to copy from VRAM. Note: A count of 0 mean 65536 |
| void VDP_Poke_128K( |
| ) |
Write a value to VRAM. [MSX2/2+/TR]
| val u8 | Value to write in VRAM |
| destLow u16 | Destination address in VRAM (16 LSB of 17-bits VRAM address) |
| destHigh u8 | Destination address in VRAM (1 MSB of 17-bits VRAM address) |
| u8 VDP_Peek_128K( |
| ) |
Read a value from VRAM. [MSX2/2+/TR]
| srcLow u16 | Source address in VRAM (16 LSB of 17-bits VRAM address) |
| srcHigh u8 | Source address in VRAM (1 MSB of 17-bits VRAM address) |
Value read in VRAM
| inline void VDP_EnableDisplay( |
| ) |
Enable/disable screen display (register 1). [MSX1/2/2+/TR]
| enable bool | TRUE to enable, FALSE to disable |
| inline void VDP_EnableVBlank( |
| ) |
Enable/disable vertical interruption (register 1). [MSX1/2/2+/TR]
| enable bool | TRUE to enable, FALSE to disable |
| inline void VDP_SetColor( |
| ) |
Set text and border default color (register 7). [MSX1/2/2+/TR]
| color u8 | Defaut color (Format: [TXT:4|BG:4]) |
| inline void VDP_SetColor2( |
| ) |
Set text and border default color (register 7). [MSX1/2/2+/TR]
| bg u8 | Background/border color (0~15) |
| text u8 | Text color (0~15) |
| inline void VDP_EnableSprite( |
| ) |
Enable/disable sprite rendering (register 8). [MSX2/2+/TR]
| enable u8 | TRUE to enable, FALSE to disable |
Disable sprite rendering (see VDP_EnableSprite). [MSX1/2/2+/TR]
| inline void VDP_EnableTransparency( |
| ) |
Enable/disable color 0 transparency (register 8). [MSX2/2+/TR]
| enable u8 | TRUE to enable, FALSE to disable |
| inline void VDP_EnableHBlank( |
| ) |
Enable/disable horizontal interruption (register 0). [MSX2/2+/TR]
| enable bool | TRUE to enable, FALSE to disable |
| inline void VDP_SetHBlankLine( |
| ) |
Set the horizontal-blank interruption line (register 19). [MSX2/2+/TR]
| line u8 | Line number where the interruption will occure |
| inline void VDP_SetVerticalOffset( |
| ) |
Set the vertical rendering offset (register 23). [MSX2/2+/TR]
| offset u8 | Number of lines of offset from the top of the screen |
| void VDP_SetAdjustOffset( |
| ) |
Adjustment of the display location on the screen (register 18). [MSX2/2+/TR]
| offset u8 | Screen display position offset (MSB 4-bits: vertical offset, LSB 4-bits: horizontal offset) |
| inline void VDP_SetAdjustOffsetXY( |
| ) |
Adjustment of the display location on the screen (register 18). [MSX2/2+/TR]
| x i8 | Horizontal screen display position offset [-7:+8] |
| y i8 | Vertical screen display position offset [-7:+8] |
| inline void VDP_SetGrayScale( |
| ) |
Enable/disable grayscale (register 8). [MSX2/2+/TR]
| enable bool | TRUE to enable, FALSE to disable |
VDP frequency flags
| inline void VDP_SetFrequency( |
| ) |
Change VDP frequency (register 9). [MSX2/2+/TR]
| freq u8 | Can be 50 (VDP_FREQ_50HZ) or 60 Hz (VDP_FREQ_60HZ) |
Change VDP frequency (register 9). [MSX2/2+/TR]
Can be 50 (VDP_FREQ_50HZ) or 60 Hz (VDP_FREQ_60HZ)
VDP line flags
| inline void VDP_SetLineCount( |
| ) |
Set line count for the current screen mode (register 9). [MSX2/2+/TR]
| lines u8 | Can be VDP_LINE_192 or VDP_LINE_212 |
| inline void VDP_SetPageAlternance( |
| ) |
Enable automatic page switch on even/odd frames. [MSX2/2+/TR]
| enable bool | TRUE to enable, FALSE to disable |
| inline void VDP_SetInterlace( |
| ) |
Enable or disable interlace mode. [MSX2/2+/TR] Needs VDP_SetPageAlternance to be set to TRUE and VDP_SetPage to a odd value.
| enable bool | TRUE to enable, FALSE to disable |
VDP render modes
| inline void VDP_SetFrameRender( |
| ) |
Set the frame render mode. [MSX2/2+/TR]
| mode u8 | Can be VDP_FRAME_STATIC, VDP_FRAME_ALTERNANCE or VDP_FRAME_INTERLACE |
| void VDP_SetPalette( |
| ) __FASTCALL __PRESERVES(d, e, iyl, iyh) |
Set a new color palette from index 1 to 15. [MSX2/2+/TR]
| pal const u8* | Address of the palette in RAM (table of 15 * 2 bytes) Format: [0:5|green:3|0|red:3|0|blue:3] |
| void VDP_SetPaletteEntry( |
| ) |
Set a given color entry in the palette. [MSX2/2+/TR]
| index u8 | Index of the palette entry (0-15) |
| color u16 | 16 bits color value (@see RGB16 macro) Format: [0:5|green:3|0|red:3|0|blue:3] |
Reset the default MSX2 palette. [MSX2/2+/TR]
Reset the default MSX1 palette. [MSX2/2+/TR]
YJK modes
| inline void VDP_SetYJK( |
| ) |
Set YJK mode. [MSX2+/TR]. See VDP_YJK enum.
| mode u8 | YJK mode (can be VDP_YJK_OFF, VDP_YJK_ON or VDP_YJK_YAE) |
| inline void VDP_ExpendCommand( |
| ) |
Enables the VDP commands for screens 0 to 4 (register 25). [MSX2+/TR]
| enable u8 | TRUE to enable, FALSE to disable |
| inline void VDP_EnableMask( |
| ) |
Allows to hide the first 8 vertical lines at left of screen (register 25). [MSX2+/TR]
| enable u8 | TRUE to enable, FALSE to disable |
| void VDP_SetHorizontalOffset( |
| ) |
Set the horizontal rendeing offset. [MSX2+/TR]
| offset u16 | Screen horizontal offset (9-bits value in pixel) |
| inline void VDP_SetHorizontalMode( |
| ) |
Set horizontal scrolling to occurs on a single page or two pages (register 25). [MSX2+/TR]
| mode u8 | Can be VDP_HSCROLL_SINGLE or VDP_HSCROLL_DOUBLE |
| void VDP_SetLayoutTable( |
| ) |
Set layout table VRAM address. [MSX1/2/2+/TR]
| addr VADDR | VRAM address where to put the table (u16 for 14-bits address and u32 for 17-bits) |
| inline void VDP_SetLayoutTableEx( |
| ) |
Set layout table VRAM address. [MSX1/2/2+/TR]
| void VDP_SetColorTable( |
| ) |
Set color table VRAM address. [MSX1/2/2+/TR]
| addr VADDR | VRAM address where to put the table (u16 for 14-bits address and u32 for 17-bits) |
| inline void VDP_SetColorTableEx( |
| ) |
Set color table VRAM address. [MSX1/2/2+/TR]
| void VDP_SetPatternTable( |
| ) |
Set pattern table VRAM address. [MSX1/2/2+/TR]
| addr VADDR | VRAM address where to put the table (u16 for 14-bits address and u32 for 17-bits) |
| inline void VDP_SetPatternTableEx( |
| ) |
Set pattern table VRAM address. [MSX1/2/2+/TR]
| void VDP_SetSpriteAttributeTable( |
| ) |
Set sprite attribute table address. [MSX1/2/2+/TR]
| addr VADDR | VRAM address where to put the table (u16 for 14-bits address and u32 for 17-bits) |
| inline void VDP_SetSpriteAttributeTableEx( |
| ) |
Set sprite attribute table address. [MSX1/2/2+/TR]
| void VDP_SetSpritePatternTable( |
| ) |
Set sprite pattern table address. [MSX1/2/2+/TR]
| addr VADDR | VRAM address where to put the table (u16 for 14-bits address and u32 for 17-bits) |
| inline void VDP_SetSpritePatternTableEx( |
| ) |
Set sprite pattern table address. [MSX1/2/2+/TR]
Get address of the Pattern Layout Table (Name)
VRAM address of the table (u16 for 14-bits address and u32 for 17-bits)
Get address of the Color Table
VRAM address of the table (u16 for 14-bits address and u32 for 17-bits)
Get address of the Pattern Generator Table
VRAM address of the table (u16 for 14-bits address and u32 for 17-bits)
Get address of the Sprite Attribute Table
VRAM address of the table (u16 for 14-bits address and u32 for 17-bits)
Get address of the Sprite Pattern Generator Table
VRAM address of the table (u16 for 14-bits address and u32 for 17-bits)
Get address of the Sprite Color Table
VRAM address of the table (u16 for 14-bits address and u32 for 17-bits)
| void VDP_SetPage( |
| ) |
Set current VRAM page. [MSX2/2+/TR]
| page u8 | Page number to set |
| inline void VDP_SetSpriteFlag( |
| ) |
Set sprite rendering parameters. [MSX1/2/2+/TR]
| flag u8 | Sprite flag to be set. Can be a combination of: VDP_SPRITE_SIZE_8 (Use 8x8 sprite size) VDP_SPRITE_SIZE_16 (Use 16x16 sprite size) VDP_SPRITE_SCALE_1 (Normal size of the sprite; 1 dot = 1 px) VDP_SPRITE_SCALE_2 (Double the size of the sprite; 1 dot = 2 px) |
| inline void VDP_SetSpriteTables( |
| ) |
Set sprite tables address. [MSX1/2/2+/TR]
| pattern | Sprite pattern table address |
| attrib | Sprite attribute table address |
| void VDP_LoadSpritePattern( |
| ) |
Load sprite pattern data into VRAM. [MSX1/2/2+/TR]
| addr const u8* | Source address for sprite patterns (in RAM/ROM). |
| index u8 | Index of the first VRAM sprite pattern to copy to (in 16x16 mode, only multiple of 4 can be used). |
| count u8 | Number of patterns to copy (8x8 mode use 1 per sprite shape, while 16x16 mode use 4). |
| void VDP_SetSpriteSM1( |
| ) |
Set sprite attribute for Sprite Mode 1. [MSX1/2/2+/TR]
| index u8 | Sprite index in the attribute table |
| x u8 | Initial X screen coordinate |
| y u8 | Initial Y screen coordinate |
| shape u8 | Sprite pattern index (in 16x16 mode, only multiple of 4 can be used) |
| color u8 | Sprite color (LSB 4-bits) + optional EC flag (VDP_SPRITE_EC) |
| void VDP_SetSprite( |
| ) |
Set sprite attribute for Sprite Mode 2. [MSX2/2+/TR]
| index u8 | Sprite index in the attribute table |
| x u8 | Initial X screen coordinate |
| y u8 | Initial Y screen coordinate |
| shape u8 | Sprite pattern index (in 16x16 mode, only multiple of 4 can be used) |
| void VDP_SetSpriteExMultiColor( |
| ) |
Set sprite attribute for Sprite Mode 2 and fill color table with color data. [MSX2/2+/TR]
| index u8 | Sprite index in the attribute table |
| x u8 | Initial X screen coordinate |
| y u8 | Initial Y screen coordinate |
| shape u8 | Sprite pattern index (in 16x16 mode, only multiple of 4 can be used) |
| ram const u8* | Address to a 16 bytes buffer that determine the sprite colors (1 byte = 1 line). With this function, you must provide a 16 bytes buffer even for 8x8 size mode. |
| void VDP_SetSpriteExUniColor( |
| ) |
Set sprite attribute for Sprite Mode 2 and fill color table with unique color. [MSX2/2+/TR]
| index u8 | Sprite index in the attribute table |
| x u8 | Initial X screen coordinate. |
| y u8 | Initial Y screen coordinate. |
| shape u8 | Sprite pattern index (in 16x16 mode, only multiple of 4 can be used). |
| color u8 | Sprite color (LSB 4-bits) + optional EC, CC & IC flags. (this color is used for the all 8/16 lines of the sprite). |
| void VDP_SetSpritePosition( |
| ) |
Update sprite position. [MSX1/2/2+/TR]
| index u8 | Sprite index in the attribute table. |
| x u8 | Initial X screen coordinate. |
| y u8 | Initial Y screen coordinate. |
| void VDP_SetSpritePositionX( |
| ) |
Update sprite position X. [MSX1/2/2+/TR]
| index u8 | Sprite index in the attribute table. |
| x u8 | Initial X screen coordinate. |
| void VDP_SetSpritePositionY( |
| ) |
Update sprite position Y. [MSX1/2/2+/TR]
| index u8 | Sprite index in the attribute table. |
| y u8 | Initial Y screen coordinate. |
| void VDP_SetSpritePattern( |
| ) |
Update sprite pattern. [MSX1/2/2+/TR]
| index u8 | Sprite index in the attribute table. |
| shape u8 | Sprite pattern index (in 16x16 mode, only multiple of 4 can be used). |
| void VDP_SetSpriteColorSM1( |
| ) |
Update sprite pattern (Sprite Mode 1). [MSX1/2/2+/TR]
| index u8 | Sprite index in the attribute table |
| color u8 | Sprite color (LSB 4-bits) + optional EC flag (see <VDP_SPRITE_EC>) |
| void VDP_SetSpriteUniColor( |
| ) |
Update sprite color (Uni-color). [MSX2/2+/TR]
| index u8 | Sprite index in the attribute table |
| color u8 | Sprite color (LSB 4-bits) + optional EC, CC & IC flags (this color is used for the all 8 lines of the sprite) |
| void VDP_SetSpriteMultiColor( |
| ) |
Update sprite color (Multi-color). [MSX2/2+/TR]
| index u8 | Sprite index in the attribute table |
| ram const u8* | Address to a 16 bytes buffer that determine the sprite colors (1 byte = 1 line). With this function, you must provide a 16 bytes buffer even for 8x8 size mode. |
| void VDP_SetSpriteData( |
| ) |
Set sprite data for Sprite Mode 2. [MSX2/2+/TR]
| index u8 | Sprite index in the attribute table |
| data const u8* | Address to a 3 bytes data buffer including sprite position and shape |
| void VDP_DisableSpritesFrom( |
| ) |
Disable all sprites from a given index. [MSX1/2/2+/TR]
This function use VDP magic Y coordinate to disable the given sprite and all the following one. If the given sprite Y coordinate is modified to another value, it will be active again and so, the following sprites too.
| index u8 | Disable sprite rendering starting from this sprite index |
| inline void VDP_HideSprite( |
| ) |
Hide a given sprite (don't disable following sprites). [MSX1/2/2+/TR]
This function simply put the given sprite off (bellow) the screen.
| index u8 | Index of the sprite to hide |
Hide all sprite sprite. [MSX1/2/2+/TR]
This function simply put the sprites off (bellow) the screen.
| index | Index of the sprite to hide |
Blink feature for Text 2 mode
| inline void VDP_SetBlinkColor( |
| ) |
Set text and border blink color (R#12). [MSX2/2+/TR]
| color u8 | Defaut color (Format: [TXT:4|BG:4]) |
| inline void VDP_SetBlinkColor2( |
| ) |
Set text and border blink color (R#12). [MSX2/2+/TR]
| bg u8 | Background/border color (0~15) |
| text u8 | Text color (0~15) |
| inline void VDP_SetBlinkTime( |
| ) |
Set blink time for the both defined colors (R#13). [MSX2/2+/TR]
| time u8 | Display time (Format: [EVEN:4|ODD:4]) |
| inline void VDP_SetBlinkTime2( |
| ) |
Set blink time for the both defined colors (R#13). [MSX2/2+/TR] Check <VDP_BLINK_TIME> enumeration for correspondance between value and time in miliseconds
| even u8 | Display time for even page / default color (0~15) |
| odd u8 | Display time for odd page / blink color (0~15) |
Set blink timer to always display alternative color (R#13). [MSX2/2+/TR]
Clean blink attribute on the whole screen. [MSX2/2+/TR]
Set blink attribute on the whole screen. [MSX2/2+/TR]
| inline void VDP_SetBlinkLine( |
| ) |
Set blink attribute on the given screen line. [MSX2/2+/TR]
| y u8 | Line number (0 to 23, or 27 if <VDP_LINE_212> is set) |
| inline void VDP_SetBlinkChunk( |
| ) |
Set blink attribute for a the given screen chunk. [MSX2/2+/TR] A screen 'chunk' is a block of 8 consecutive tiles starting at a x-coordinate multiple of 8 column number (0, 8, 16, etc.)
| x u8 | Column number (0 to 79) |
| y u8 | Row number (0 to 23, or 27 if <VDP_LINE_212> is set) |
| inline void VDP_SetBlinkChunkMask( |
| ) |
Set blink attribute mask for a the given screen chunk. [MSX2/2+/TR] A screen 'chunk' is a block of 8 consecutive tiles starting at a x-coordinate multiple of 8 column number (0, 8, 16, etc.)
| x u8 | Column number (0 to 79) |
| y u8 | Row number (0 to 23, or 27 if <VDP_LINE_212> is set) |
| mask u8 | Chunk mask (1 bit is equal to 1 tile; bit #0 is the left most tile) |
| inline void VDP_SetBlinkChunkX( |
| ) |
Set blink attribute for a the given number of chunk. [MSX2/2+/TR] A screen 'chunk' is a block of 8 consecutive tiles starting at a x-coordinate multiple of 8 column number (0, 8, 16, etc.)
| x u8 | Column number (0 to 79) |
| y u8 | Row number (0 to 23, or 27 if <VDP_LINE_212> is set) |
| void VDP_SetBlinkTile( |
| ) |
Set blink attribute for a the given screen tile. [MSX2/2+/TR]
| x u8 | Column number (0 to 79) |
| y u8 | Row number (0 to 23, or 27 if <VDP_LINE_212> is set) |
Graph mode 2 & 3 specific functions
| inline void VDP_FillScreen_GM2( |
| ) |
Fill the full screen with a given pattern value. [MSX1/2/2+/TR]
| value u8 | Pattern index to fill In G2/G3 modes, the same index can define different pattern in the 3 vertical sections |
| inline void VDP_Poke_GM2( |
| ) |
Set a GM cell value from x/y coordinate
| inline u8 VDP_Peek_GM2( |
| ) |
Get a GM cell value from x/y coordinate
| void VDP_LoadPattern_GM2( |
| ) |
Load tile patterns in all 3 screen sections. [MSX1/2/2+/TR]
| src const u8* | Address of data buffer to copy to VRAM |
| count u8 | Number of pattern to copy. Note: A count of 0 mean 256 |
| offset u8 | Pattern index from which to copy data |
| void VDP_LoadColor_GM2( |
| ) |
Load tile colors in all 3 screen sections. [MSX1/2/2+/TR]
| src const u8* | Address of data buffer to copy to VRAM |
| count u8 | Number of pattern to copy. Note: A count of 0 mean 256 |
| offset u8 | Pattern index from which to copy data |
| inline void VDP_LoadBankPattern_GM2( |
| ) |
Load tile patterns in a given screen section (bank). [MSX1/2/2+/TR]
| src const u8* | Address of data buffer to copy to VRAM |
| count u8 | Number of pattern to copy. Note: A count of 0 mean 256 |
| bank u8 | Screen section number (bank) from 0 (up) to 2 (bottom). On MSX2 or higher, a 4th bank is accessible via vertical scrolling |
| offset u8 | Pattern index from which to copy data |
| inline void VDP_LoadBankColor_GM2( |
| ) |
Load tile colors in a given screen section (bank). [MSX1/2/2+/TR]
| src const u8* | Address of data buffer to copy to VRAM |
| count u8 | Number of pattern to copy. Note: A count of 0 mean 256 |
| bank u8 | Screen section number (bank) from 0 (up) to 2 (bottom). On MSX2 or higher, a 4th bank is accessible via vertical scrolling |
| offset u8 | Pattern index from which to copy data |
| void VDP_WriteLayout_GM2( |
| ) |
Copy patterns layout to a given rectangle. [MSX1/2/2+/TR]
| src const u8* | Address of data buffer to copy to VRAM |
| dx u8 | Destination starting X position |
| dy u8 | Destination starting Y position |
| dx u8 | Destination width |
| dy u8 | Destination height |
| void VDP_FillLayout_GM2( |
| ) |
Fill a rectangle with a given value. [MSX1/2/2+/TR]
| value u8 | Pattern index to fill |
| dx u8 | Destination starting X position |
| dy u8 | Destination starting Y position |
| dx u8 | Destination width |
| dy u8 | Destination height |
| inline VADDR VDP_GetColorTable_GM2( |
| ) |
Get address of the Color Table of the given GM2 tilset bank (0-2)
VRAM address of the table (u16 for 14-bits address and u32 for 17-bits)
| inline VADDR VDP_GetPatternTable_GM2( |
| ) |
Get address of the Pattern Generator Table of the given GM2 tilset bank (0-2)
VRAM address of the table (u16 for 14-bits address and u32 for 17-bits)
VDP commands wrapper functions
Wait for previous VDP command to be finished. [MSX2/2+/TR]
Send VDP command (form registres 32 to 46). [MSX2/2+/TR]
Send VDP command (form registres 36 to 46). [MSX2/2+/TR]
| void VPD_CommandWriteLoop( |
| ) __FASTCALL __PRESERVES(b, d, e, iyl, iyh) |
Write to VRAM command loop. [MSX2/2+/TR]
| addr const u8* | Address of the source buffer |
| void VPD_CommandReadLoop( |
| ) __FASTCALL |
Read to VRAM command loop. [MSX2/2+/TR]
| addr u8* | Address of the destination buffer (in RAM) |
| void VDP_CommandCustomR32( |
| ) |
Send VDP custom command through buffer (form registres 32 to 46). [MSX2/2+/TR]
| void VDP_CommandCustomR36( |
| ) |
Send VDP custom command through buffer (form registres 36 to 46). [MSX2/2+/TR]