diff --git a/Agon-HW.md b/Agon-HW.md index aa38f47..6a61f6b 100644 --- a/Agon-HW.md +++ b/Agon-HW.md @@ -368,7 +368,7 @@ Data packet sent from VDP (4 bytes): ``` ; Keyboard Data -; Received after a keypress event in the VPD +; Received after a keypress event in the VDP ; vdp_protocol_KEY:          LD A, (_vdp_protocol_data + 0) ; ASCII key code diff --git a/src/agon/vdp_vdu.c b/src/agon/vdp_vdu.c index bca0b78..cf00497 100644 --- a/src/agon/vdp_vdu.c +++ b/src/agon/vdp_vdu.c @@ -155,12 +155,12 @@ void vdp_get_scr_dims( bool wait ) { if ( !sys_vars ) vdp_vdu_init(); - if ( wait ) sys_vars->vpd_pflags = 0; + if ( wait ) sys_vars->vdp_pflags = 0; VDP_PUTS( vdu_get_scr_dims ); // wait for results of mode change to be reflected in SYSVARs - if ( wait ) while ( !(sys_vars->vpd_pflags & vdp_pflag_mode) ); + if ( wait ) while ( !(sys_vars->vdp_pflags & vdp_pflag_mode) ); } void vdp_logical_scr_dims( bool flag ) diff --git a/src/libc/include/mos_api.h b/src/libc/include/mos_api.h index e20246b..160981b 100644 --- a/src/libc/include/mos_api.h +++ b/src/libc/include/mos_api.h @@ -102,7 +102,7 @@ typedef enum { #define sysvar_mouseXDelta 0x2F // 2: Mouse X delta #define sysvar_mouseYDelta 0x31 // 2: Mouse Y delta -// Flags for the VPD protocol - sysvar_vpd_pflags +// Flags for the VDP protocol - sysvar_vdp_pflags #define vdp_pflag_cursor 0x01 #define vdp_pflag_scrchar 0x02 #define vdp_pflag_point 0x04 @@ -131,7 +131,7 @@ typedef union { typedef struct { uint32_t time; - uint8_t vpd_pflags; + uint8_t vdp_pflags; uint8_t keyascii; uint8_t keymods; uint8_t cursorX; @@ -237,7 +237,7 @@ extern void mos_puts(char * buffer, uint24_t size, char delimiter); // Get system variables extern uint32_t getsysvar_time(); -extern uint8_t getsysvar_vpd_pflags(); +extern uint8_t getsysvar_vdp_pflags(); extern uint8_t getsysvar_keyascii(); extern uint8_t getsysvar_keymods(); extern uint8_t getsysvar_cursorX(); diff --git a/src/libc/mos_api.inc b/src/libc/mos_api.inc index 0191bb1..f164681 100644 --- a/src/libc/mos_api.inc +++ b/src/libc/mos_api.inc @@ -8,7 +8,7 @@ ; Modinfo: ; 05/08/2022: Added mos_feof ; 09/08/2022: Added system variables: cursorX, cursorY -; 18/08/2022: Added system variables: scrchar, scrpixel, audioChannel, audioSuccess, vpd_pflags +; 18/08/2022: Added system variables: scrchar, scrpixel, audioChannel, audioSuccess, vdp_pflags ; 05/09/2022: Added mos_ren, vdp_pflag_mode ; 24/09/2022: Added mos_getError, mos_mkdir ; 13/10/2022: Added mos_oscli @@ -139,7 +139,7 @@ fa_open_append := 030h ; Index into _sysvars in globals.asm ; sysvar_time := 000h ; 4: Clock timer in centiseconds (incremented by 2 every VBLANK) -sysvar_vpd_pflags := 004h ; 1: Flags to indicate completion of VDP commands +sysvar_vdp_pflags := 004h ; 1: Flags to indicate completion of VDP commands sysvar_keyascii := 005h ; 1: ASCII keycode, or 0 if no key is pressed sysvar_keymods := 006h ; 1: Keycode modifiers sysvar_cursorX := 007h ; 1: Cursor X position @@ -162,7 +162,7 @@ sysvar_keydelay := 022h ; 2: Keyboard repeat delay sysvar_keyrate := 024h ; 2: Keyboard repeat reat sysvar_keyled := 026h ; 1: Keyboard LED status -; Flags for the VPD protocol +; Flags for the VDP protocol ; vdp_pflag_cursor := 00000001b vdp_pflag_scrchar := 00000010b diff --git a/src/libc/mos_api.src b/src/libc/mos_api.src index b04831b..d88b1c0 100644 --- a/src/libc/mos_api.src +++ b/src/libc/mos_api.src @@ -73,7 +73,7 @@ public _mos_i2c_open public _getsysvar_time - public _getsysvar_vpd_pflags + public _getsysvar_vdp_pflags public _getsysvar_keyascii public _getsysvar_keymods public _getsysvar_cursorX @@ -149,11 +149,11 @@ _getsysvar_time: pop ix ret -_getsysvar_vpd_pflags: +_getsysvar_vdp_pflags: push ix ld a, mos_sysvars rst.lil 08h - ld a, (ix+sysvar_vpd_pflags) + ld a, (ix+sysvar_vdp_pflags) pop ix ret diff --git a/tests/big-bitmap/src/vdp_vdu.c b/tests/big-bitmap/src/vdp_vdu.c index 66709b5..9a1baf9 100644 --- a/tests/big-bitmap/src/vdp_vdu.c +++ b/tests/big-bitmap/src/vdp_vdu.c @@ -32,12 +32,12 @@ void vdp_get_scr_dims( bool wait ) { if ( !sv ) vdp_vdu_init(); - if ( wait ) sv->vpd_pflags = 0; + if ( wait ) sv->vdp_pflags = 0; mos_puts( (char *)&_vdp_get_scr_dims, sizeof(_vdp_get_scr_dims), 0 ); // wait for results of mode change to be reflected in SYSVARs - if ( wait ) while ( !(sv->vpd_pflags & vdp_pflag_mode) ); + if ( wait ) while ( !(sv->vdp_pflags & vdp_pflag_mode) ); } static struct { uint8_t vdu_23; uint8_t vdu_23_0; uint8_t vdu_23_0_0xC0; uint8_t flag; } diff --git a/tests/vdu/src/vdp_vdu.c b/tests/vdu/src/vdp_vdu.c index 66709b5..9a1baf9 100644 --- a/tests/vdu/src/vdp_vdu.c +++ b/tests/vdu/src/vdp_vdu.c @@ -32,12 +32,12 @@ void vdp_get_scr_dims( bool wait ) { if ( !sv ) vdp_vdu_init(); - if ( wait ) sv->vpd_pflags = 0; + if ( wait ) sv->vdp_pflags = 0; mos_puts( (char *)&_vdp_get_scr_dims, sizeof(_vdp_get_scr_dims), 0 ); // wait for results of mode change to be reflected in SYSVARs - if ( wait ) while ( !(sv->vpd_pflags & vdp_pflag_mode) ); + if ( wait ) while ( !(sv->vdp_pflags & vdp_pflag_mode) ); } static struct { uint8_t vdu_23; uint8_t vdu_23_0; uint8_t vdu_23_0_0xC0; uint8_t flag; }