diff --git a/include/hucc/hucc-systemcard.asm b/include/hucc/hucc-systemcard.asm index 3ad483a6..5b64289d 100644 --- a/include/hucc/hucc-systemcard.asm +++ b/include/hucc/hucc-systemcard.asm @@ -277,6 +277,34 @@ _cd_playmsf.7 .proc +; *************************************************************************** +; *************************************************************************** +; +; unsigned char __fastcall cd_loadvram( unsigned char ovl_index<_cl>, unsigned int sect_offset<_si>, unsigned int vramaddr<_bx>, unsigned int sectors<_al> ); + +_cd_fastvram.4 .proc + + ldx <_cl ; Get file address and length. + jsr get_file_lba + + lda.l <_si ; Add the sector offset. + ldy.h <_si + jsr _add_sectors + + lda #$FF ; Signal a VRAM load. + sta <_dh + + system cd_read + tax ; Put return code in X. + + cly ; Return code in Y:X, X -> A. + + leave ; Return and copy X -> A. + + .endp + + + ; *************************************************************************** ; *************************************************************************** ; diff --git a/include/hucc/hucc-systemcard.h b/include/hucc/hucc-systemcard.h index 4daed1ce..f907b4b0 100644 --- a/include/hucc/hucc-systemcard.h +++ b/include/hucc/hucc-systemcard.h @@ -92,6 +92,7 @@ extern unsigned char __fastcall cd_unpause( void ); extern void __fastcall __macro cd_fade( unsigned char type ); extern unsigned char __fastcall cd_playtrk( unsigned char start_track<_bx>, unsigned char end_track<_cx>, unsigned char mode<_dh> ); extern unsigned char __fastcall cd_playmsf( unsigned char start_minute<_al>, unsigned char start_second<_ah>, unsigned char start_frame<_bl>, unsigned char end_minute<_cl>, unsigned char end_second<_ch>, unsigned char end_frame<_dl>, unsigned char mode<_dh> ); +extern unsigned char __fastcall cd_fastvram( unsigned char ovl_index<_cl>, unsigned int sect_offset<_si>, unsigned int vramaddr<_bx>, unsigned int sectors<_al> ); extern unsigned char __fastcall cd_loadvram( unsigned char ovl_index<_cl>, unsigned int sect_offset<_si>, unsigned int vramaddr<_bx>, unsigned int bytes<_ax> ); extern unsigned char __fastcall cd_loaddata( unsigned char ovl_index<_cl>, unsigned int sect_offset<_si>, unsigned char __far *buffer<_bp_bank:_bp>, unsigned int bytes<__ptr> ); extern unsigned char __fastcall cd_loadbank( unsigned char ovl_index<_cl>, unsigned int sect_offset<_si>, unsigned char bank<_bl>, unsigned int sectors<_al> );