mirror of
https://github.com/RevCurtisP/C02.git
synced 2024-11-22 16:34:15 +00:00
105 lines
3.1 KiB
Plaintext
105 lines
3.1 KiB
Plaintext
/****************************************
|
|
* xmemory.h02 - Extended Memory Access *
|
|
* for run6502 Emulator *
|
|
****************************************/
|
|
|
|
#define XLBANK $0F //Maximum Logical Bank
|
|
|
|
/* Exhange with with Extended Memory *
|
|
* Setup: xsetad(xbank, xaddr) *
|
|
* setdst(maddr) *
|
|
* Args: int n - number of bytes *
|
|
* Returns: char bank - Extended Bank *
|
|
* int addr - Extended Address */
|
|
void xshng();
|
|
|
|
/* Get Logical Extended Memory Address *
|
|
* Returns: char xbank - Logical Bank *
|
|
* int xaddr - Logical Address *
|
|
char xgetad();
|
|
|
|
/* Read Byte from Extended Memory *
|
|
* Returns: char b: Byte Read */
|
|
char xgetc();
|
|
|
|
/* Read Word from Extended Memory *
|
|
* Returns: int i: Word Read */
|
|
int xgeti();
|
|
|
|
/* Read Long from Extended Memory *
|
|
* Returns: long l: Long Read */
|
|
char xgetl();
|
|
|
|
/* Load from Extended Memory *
|
|
* Setup: xsetad(xbank, xaddr) *
|
|
* setdst(maddr) *
|
|
* Args: int n - number of bytes *
|
|
* Returns: char bank - Extended Bank *
|
|
* int addr - Extended Address */
|
|
void xload();
|
|
|
|
/* Write Byte to Extended Memory *
|
|
* Args: char b: Byte to Write */
|
|
void xputc();
|
|
|
|
/* Write Word to Extended Memory *
|
|
* Args: int i: Word to Write */
|
|
void xputi();
|
|
|
|
/* Write Long to Extended Memory *
|
|
* Args: long l: Long to Write */
|
|
void xputl();
|
|
|
|
/* Read Bytes from Extended Memory *
|
|
* Args: char n - Number of Bytes *
|
|
* int maddr - Destination Address *
|
|
* Returns: char bank - Extended Bank *
|
|
* int addr - Extended Address */
|
|
void xread();
|
|
|
|
/* Read Extended Memory Pages *
|
|
* Args: char n - Number of Pages *
|
|
char p - Local Start Page */
|
|
void xrpage();
|
|
|
|
/* Save to Extended Memory *
|
|
* Setup: setsrc(maddr) *
|
|
* Args: int n - number of bytes *
|
|
* Returns: char bank - Extended Bank *
|
|
* int addr - Extended Address */
|
|
void xsave();
|
|
|
|
/* Set Extended Memory Address *
|
|
* Args: char xbank - Extended Bank *
|
|
* int xaddr - Extended Address */
|
|
void xsetad();
|
|
|
|
/* Set Extended Memory Page *
|
|
* Args: char xbank - Extended Bank *
|
|
* int xpage - Extended Page */
|
|
void xsetpg();
|
|
|
|
/* Swap Extended Memory Pages *
|
|
* Args: char n - Number of Pages *
|
|
char p - Local Start Page */
|
|
void xspage();
|
|
|
|
/* Swap Bytes with Extended Memory *
|
|
* Args: char n - Number of Bytes *
|
|
* int maddr - Destination Address *
|
|
* Returns: char bank - Extended Bank *
|
|
* int addr - Extended Address */
|
|
void xswap();
|
|
|
|
/* Write Extended Memory Pages *
|
|
* Args: char n - Number of Pages *
|
|
char p - Local Start Page */
|
|
void xwpage();
|
|
|
|
/* Write Bytes to Extended Memory *
|
|
* Args: char n - Number of Bytes *
|
|
* int maddr - Source Address *
|
|
* Returns: char bank - Extended Bank *
|
|
* int addr - Extended Address */
|
|
void xwrite();
|