mirror of
https://github.com/RevCurtisP/C02.git
synced 2024-09-27 14:56:27 +00:00
Changed arguments of extended memory page operations
This commit is contained in:
parent
3be3d5e9f9
commit
7ed5a51ae2
@ -40,7 +40,13 @@ XGETAD: CLC ;Set Mode to GET
|
|||||||
JSR XMCMD ;Execute Command and Return
|
JSR XMCMD ;Execute Command and Return
|
||||||
BCC .SETADR ;Set Shadow Address and Return
|
BCC .SETADR ;Set Shadow Address and Return
|
||||||
|
|
||||||
;xsetad() - Set Logical Extended Memory Address
|
|
||||||
|
;xsetpg(xbank,xpage) - Set Extended Bank and Page
|
||||||
|
;Args: A = Logical Bank ($00-$0F)
|
||||||
|
; Y = Logical Page ($00$FF)
|
||||||
|
XSETPG LDX #0 ;Clear Address LSB and Execute XSETAD
|
||||||
|
|
||||||
|
;xsetad(xbank,xaddr) - Set Logical Extended Memory Address
|
||||||
; For run6502, this is the same as the Physical Address
|
; For run6502, this is the same as the Physical Address
|
||||||
;Args: A = Logical Bank ($00-$0F)
|
;Args: A = Logical Bank ($00-$0F)
|
||||||
; YX = Logical Address ($0000-$FFFF)
|
; YX = Logical Address ($0000-$FFFF)
|
||||||
@ -155,7 +161,7 @@ XREAD: CLC ;Set Mode to GET
|
|||||||
;Setup: XSETAD - Set Extended Memory Start Address
|
;Setup: XSETAD - Set Extended Memory Start Address
|
||||||
;Requires: SRCPTR = Local Memory Start Address
|
;Requires: SRCPTR = Local Memory Start Address
|
||||||
;Sets: TEMP2,TEMP1 = Local Memory Start Address
|
;Sets: TEMP2,TEMP1 = Local Memory Start Address
|
||||||
;Affects: A,X,Y
|
;Returns: AYX = New Extended Memory Address
|
||||||
XSAVE: SEC ;Set Mode to SET
|
XSAVE: SEC ;Set Mode to SET
|
||||||
JSR SAVRXY ;Save Byte Count
|
JSR SAVRXY ;Save Byte Count
|
||||||
JSR GETSRC ;Get Destination Address
|
JSR GETSRC ;Get Destination Address
|
||||||
@ -176,7 +182,7 @@ XLOAD: CLC ;Set Mode to GET
|
|||||||
;xchng(size) - Exchange with Extended Memory
|
;xchng(size) - Exchange with Extended Memory
|
||||||
;Args: YX = Number of Bytes to Swap
|
;Args: YX = Number of Bytes to Swap
|
||||||
;Requires: DSTPTR = Local Memory Start Address
|
;Requires: DSTPTR = Local Memory Start Address
|
||||||
;Affects: A,X,Y
|
;Returns: AYX = New Extended Memory Address
|
||||||
XCHNG: JSR SAVRXY ;Save Byte Count
|
XCHNG: JSR SAVRXY ;Save Byte Count
|
||||||
JSR GETDST ;Get Destination Address
|
JSR GETDST ;Get Destination Address
|
||||||
JSR .SYSADR ;Set System Address
|
JSR .SYSADR ;Set System Address
|
||||||
@ -184,27 +190,23 @@ XCHNG: JSR SAVRXY ;Save Byte Count
|
|||||||
.XSWAP LDA #'X' ;Set Command to SWPMBLK
|
.XSWAP LDA #'X' ;Set Command to SWPMBLK
|
||||||
BNE .XCMDSA ;Execute, Set Shadow Address, and Return
|
BNE .XCMDSA ;Execute, Set Shadow Address, and Return
|
||||||
|
|
||||||
;xwrtpg(xbank, xpage, mpage) - Write Extended Memory Page
|
;xwpage(count, page) - Write Extended Memory Pages
|
||||||
XWRTP: SEC ;Set Mode to SET
|
;Args: A = Number of Pages
|
||||||
BCS .XPAGE ;and Execute Move Page
|
; Y = Local Memory Starting Page
|
||||||
|
;Returns: AYX = New Extended Memory Address
|
||||||
|
XWPAGE: RTS
|
||||||
|
|
||||||
;xrdpg(xbank, xpage, mpage) - Read Extended Memory Page
|
;xrpage(count, page) - Read Extended Memory Pages
|
||||||
XRDP: CLC ;Set Mode to GET
|
;Args: A = Number of Pages
|
||||||
.XPAGE JSR .XSPAGE ;Set System and Extended Address
|
; Y = Local Memory Starting Page
|
||||||
BNE .XMBLK ;Execute MBLCK Command and Return
|
;Returns: AYX = New Extended Memory Address
|
||||||
|
XRPAGE: RTS
|
||||||
|
|
||||||
;Set System Page and Extended Bank and Page
|
;xspage(count, page) - Swap Extended Memory Pages
|
||||||
.XSPAGE STX TEMP0 ;Save System Memory Page
|
;Args: A = Number of Pages
|
||||||
LDX #0
|
; Y = Local Memory Starting Page
|
||||||
JSR XSETAD ;Set Extended Memory Bank and Page
|
;Returns: AYX = New Extended Memory Address
|
||||||
LDY TEMP0 ;Set System Memory Address
|
XSPAGE: RTS
|
||||||
JSR .SYSADR ;to System Memory Page
|
|
||||||
LDY #1 ;Set Byte Count to 256
|
|
||||||
RTS
|
|
||||||
|
|
||||||
;xswppg(xbank, xpage, mpage) - Swap with Extended Memory Page
|
|
||||||
XSWPP: JSR .XSPAGE ;Set System and Extended Address
|
|
||||||
BNE .XSWAP ;Execute SWPMBLK Command and Return
|
|
||||||
|
|
||||||
; The run6502 Extended Memory Command Processor simulates
|
; The run6502 Extended Memory Command Processor simulates
|
||||||
; register based device that uses DMA for block copies
|
; register based device that uses DMA for block copies
|
||||||
|
@ -57,11 +57,10 @@ void xputl();
|
|||||||
* int addr - Extended Address */
|
* int addr - Extended Address */
|
||||||
void xread();
|
void xread();
|
||||||
|
|
||||||
/* Read Extended Memory Page *
|
/* Read Extended Memory Pages *
|
||||||
* Args: char xbank - Extended Bank *
|
* Args: char n - Number of Pages *
|
||||||
* char xpage - Extended Page *
|
char p - Local Start Page */
|
||||||
* char mpage - Memory Page */
|
void xrpage();
|
||||||
void xrdp();
|
|
||||||
|
|
||||||
/* Save to Extended Memory *
|
/* Save to Extended Memory *
|
||||||
* Setup: setsrc(maddr) *
|
* Setup: setsrc(maddr) *
|
||||||
@ -75,6 +74,16 @@ void xsave();
|
|||||||
* int xaddr - Extended Address */
|
* int xaddr - Extended Address */
|
||||||
void xsetad();
|
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 *
|
/* Swap Bytes with Extended Memory *
|
||||||
* Args: char n - Number of Bytes *
|
* Args: char n - Number of Bytes *
|
||||||
* int maddr - Destination Address *
|
* int maddr - Destination Address *
|
||||||
@ -82,11 +91,10 @@ void xsetad();
|
|||||||
* int addr - Extended Address */
|
* int addr - Extended Address */
|
||||||
void xswap();
|
void xswap();
|
||||||
|
|
||||||
/* Swap Extended Memory Page *
|
/* Write Extended Memory Pages *
|
||||||
* Args: char xbank - Extended Bank *
|
* Args: char n - Number of Pages *
|
||||||
* char xpage - Extended Page *
|
char p - Local Start Page */
|
||||||
* char mpage - Memory Page */
|
void xwpage();
|
||||||
void xswpp();
|
|
||||||
|
|
||||||
/* Write Bytes to Extended Memory *
|
/* Write Bytes to Extended Memory *
|
||||||
* Args: char n - Number of Bytes *
|
* Args: char n - Number of Bytes *
|
||||||
@ -94,9 +102,3 @@ void xswpp();
|
|||||||
* Returns: char bank - Extended Bank *
|
* Returns: char bank - Extended Bank *
|
||||||
* int addr - Extended Address */
|
* int addr - Extended Address */
|
||||||
void xwrite();
|
void xwrite();
|
||||||
|
|
||||||
/* Write Extended Memory Page *
|
|
||||||
* Args: char xbank - Extended Bank *
|
|
||||||
* char xpage - Extended Page *
|
|
||||||
* char mpage - Memory Page */
|
|
||||||
void xwrtp();
|
|
||||||
|
Loading…
Reference in New Issue
Block a user